Mercurial > libavformat.hg
changeset 3017:a086b58a3336 libavformat
Fix a possible use of an uninitialized pointer.
author | reimar |
---|---|
date | Mon, 04 Feb 2008 12:13:09 +0000 |
parents | eac2648449a5 |
children | 93c9fd942256 |
files | sierravmd.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sierravmd.c Mon Feb 04 10:48:41 2008 +0000 +++ b/sierravmd.c Mon Feb 04 12:13:09 2008 +0000 @@ -73,7 +73,7 @@ { 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 @@ 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;