mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
MOV: fix crash when 'meta' occurs before first 'trak'
Originally committed as revision 17781 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
bc8763cda9
commit
fefe43ff2c
@ -308,10 +308,15 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
|
|||||||
|
|
||||||
static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
|
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 type;
|
||||||
uint32_t ctype;
|
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_byte(pb); /* version */
|
||||||
get_be24(pb); /* flags */
|
get_be24(pb); /* flags */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user