avformat/mov.c: require tfhd to begin parsing trun
authorchcunningham <chcunningham@chromium.org>
Thu, 7 Feb 2019 00:12:51 +0000 (16:12 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 24 Mar 2019 09:39:03 +0000 (10:39 +0100)
commit90c194710a6610a6d596877c3f53a11a0cc3a65a
tree5b4d175b0eccbdc43330fb2192481113f4f5054b
parent98b5ec4bc0efbb232305fa0e71f13013ea1dd813
avformat/mov.c: require tfhd to begin parsing trun

Detecting missing tfhd avoids re-using tfhd track info from the previous
moof. For files with multiple tracks, this may make a mess of the
avindex and fragindex, which can later trigger av_assert0 in
mov_read_trun().

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3ea87e5d9ea075d5b3c0f4f8c6c48e514b454cbe)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/isom.h
libavformat/mov.c