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

Michael Niedermayer git at videolan.org
Thu Dec 8 21:29:52 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec  7 23:35:57 2011 +0100| [74436ad51e6ebb930a0a70c8c3308269681fec9f] | committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=74436ad51e6ebb930a0a70c8c3308269681fec9f
---

 libavformat/libnut.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index be0328a..757f9d2 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);



More information about the ffmpeg-cvslog mailing list