[FFmpeg-cvslog] r17781 - trunk/libavformat/mov.c
alexc
subversion
Tue Mar 3 19:19:47 CET 2009
Author: alexc
Date: Tue Mar 3 19:19:44 2009
New Revision: 17781
Log:
MOV: fix crash when 'meta' occurs before first 'trak'
Modified:
trunk/libavformat/mov.c
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c Tue Mar 3 18:06:18 2009 (r17780)
+++ trunk/libavformat/mov.c Tue Mar 3 19:19:44 2009 (r17781)
@@ -308,10 +308,15 @@ static int mov_read_dref(MOVContext *c,
static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
- AVStream *st = c->fc->streams[c->fc->nb_streams-1];
+ AVStream *st;
uint32_t type;
uint32_t ctype;
+ if (c->fc->nb_streams < 1) // meta before first trak
+ return 0;
+
+ st = c->fc->streams[c->fc->nb_streams-1];
+
get_byte(pb); /* version */
get_be24(pb); /* flags */
More information about the ffmpeg-cvslog
mailing list