[FFmpeg-cvslog] avformat/nutdec: always initialize event_flags

Michael Niedermayer git at videolan.org
Wed Aug 20 16:56:22 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 20 16:45:08 2014 +0200| [05dd5368a92718f3a25f97f4697acffbabc7458f] | committer: Michael Niedermayer

avformat/nutdec: always initialize event_flags

Fixes: CID1231990

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

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

 libavformat/nutdec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 057fdc7..1b00cdb 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -484,7 +484,7 @@ static int decode_info_header(NUTContext *nut)
     int64_t value, end;
     char name[256], str_value[1024], type_str[256];
     const char *type;
-    int *event_flags;
+    int *event_flags = NULL;
     AVChapter *chapter      = NULL;
     AVStream *st            = NULL;
     AVDictionary **metadata = NULL;
@@ -560,7 +560,8 @@ static int decode_info_header(NUTContext *nut)
 
             if (metadata && av_strcasecmp(name, "Uses") &&
                 av_strcasecmp(name, "Depends") && av_strcasecmp(name, "Replaces")) {
-                *event_flags |= metadata_flag;
+                if (event_flags)
+                    *event_flags |= metadata_flag;
                 av_dict_set(metadata, name, str_value, 0);
             }
         }



More information about the ffmpeg-cvslog mailing list