libnut: NULL priv->nut after nut_demuxer_uninit() as a saftey precaution.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 13 years ago
parent e21f8a07ca
commit 74436ad51e
  1. 2
      libavformat/libnut.c

@ -213,6 +213,7 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
if ((ret = nut_read_headers(nut, &s, NULL))) {
av_log(avf, AV_LOG_ERROR, " NUT error: %s\n", nut_error(ret));
nut_demuxer_uninit(nut);
priv->nut = NULL;
return -1;
}
@ -231,6 +232,7 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
st->codec->extradata = av_mallocz(st->codec->extradata_size);
if(!st->codec->extradata){
nut_demuxer_uninit(nut);
priv->nut = NULL;
return AVERROR(ENOMEM);
}
memcpy(st->codec->extradata, s[i].codec_specific, st->codec->extradata_size);

Loading…
Cancel
Save