[FFmpeg-devel] [PATCH] lavf/mov: ensure only one tkhd per trak

Chris Cunningham chcunningham at chromium.org
Thu Dec 13 22:39:32 EET 2018


>
> "st->id" is not necessary for demuxing AFAIK, please correct me if Im
> wrong.
> Would an init value to -1 for st->id work ?
>

st->id does get used here and there. For ex, mov_read_trun reads the id to
decide which stream corresponds to the current fragment. But if the ID
isn't coming from a tkhd (either because none exits, or because you have
truns before the tkhd appears), perhaps we can consider invalid. Using a
value of -1 would make that easier to detect. It risks breaking some bad
files, but I'm fine with that if you'd support it. I'll send a new patch
and we can see if Michael finds new breaks.

Chris


More information about the ffmpeg-devel mailing list