[FFmpeg-devel] [PATCH] lavf/matroskadec: A_QUICKTIME and AV_CODEC_ID_NONE

Mats Peterson matsp888 at yahoo.com
Tue Jan 5 12:08:48 CET 2016


On 01/04/2016 10:34 PM, Hendrik Leppkes wrote:

>>
>> I have also removed some superfluous checks for the format/fourcc at the
>> very start of the private data for A_QUICKTIME and V_QUICKTIME. This
>> shouldn't happen, since the private data always starts with the sample
>> description size, *then* the format/fourcc, in a Matroska file.
>>
>
> Don't remove any existing checks, they usually get added based on actual files.
> "Should not" does not mean "does not".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

I'm still a bit afraid about the following construct for both 
A_QUICKTIME and V_QUICKTIME. It could lead to false positives. The fact 
is that the format/fourcc ALWAYS starts at offset 4 of the private data 
in a Matroska file. Does anyone sit on a file where it does not?

if (ff_codec_get_id(ff_codec_movaudio_tags, 
AV_RL32(track->codec_priv.data))) {
    fourcc = AV_RL32(track->codec_priv.data);
    codec_id = ff_codec_get_id(ff_codec_movaudio_tags, fourcc);
}

Mats

-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/


More information about the ffmpeg-devel mailing list