[FFmpeg-cvslog] r11857 - trunk/libavformat/sierravmd.c

reimar subversion
Mon Feb 4 13:13:09 CET 2008


Author: reimar
Date: Mon Feb  4 13:13:09 2008
New Revision: 11857

Log:
Fix a possible use of an uninitialized pointer.


Modified:
   trunk/libavformat/sierravmd.c

Modified: trunk/libavformat/sierravmd.c
==============================================================================
--- trunk/libavformat/sierravmd.c	(original)
+++ trunk/libavformat/sierravmd.c	Mon Feb  4 13:13:09 2008
@@ -73,7 +73,7 @@ static int vmd_read_header(AVFormatConte
 {
     VmdDemuxContext *vmd = s->priv_data;
     ByteIOContext *pb = s->pb;
-    AVStream *st, *vst;
+    AVStream *st = NULL, *vst;
     unsigned int toc_offset;
     unsigned char *raw_frame_table;
     int raw_frame_table_size;
@@ -181,6 +181,7 @@ static int vmd_read_header(AVFormatConte
                 continue;
             switch(type) {
             case 1: /* Audio Chunk */
+                if (!st) break;
                 /* first audio chunk contains several audio buffers */
                 if(current_audio_pts){
                     vmd->frame_table[total_frames].frame_offset = current_offset;




More information about the ffmpeg-cvslog mailing list