aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/libnut.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-07 23:35:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-08 21:21:34 +0100
commit74436ad51e6ebb930a0a70c8c3308269681fec9f (patch)
tree274660a6d9bb1a49ee955942214c2fc0f4cdee35 /libavformat/libnut.c
parente21f8a07ca29c6c9328bf59a5ca14087c52c67c3 (diff)
downloadffmpeg-74436ad51e6ebb930a0a70c8c3308269681fec9f.tar.gz
libnut: NULL priv->nut after nut_demuxer_uninit() as a saftey precaution.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/libnut.c')
-rw-r--r--libavformat/libnut.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index be0328a954..757f9d252a 100644
--- a/libavformat/libnut.c
+++ b/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);