[FFmpeg-devel] [PATCH 2/3] oggdec: verify page checksum

Lynne dev at lynne.ee
Tue Apr 28 18:07:45 EEST 2020


Apr 28, 2020, 15:59 by mattias.wadman at gmail.com:

> On Tue, Apr 28, 2020 at 4:45 PM Lynne <dev at lynne.ee> wrote:
>
>>
>> Apr 28, 2020, 15:31 by mattias.wadman at gmail.com:
>>
>> > Nice, test files works fine now
>> >
>> > Would it make sense to conditionally ignore crc mismatch based on
>> > s->error_recognition & AV_EF_CRCCHECK ?
>> >
>>
>> I don't think so. This container specifically relies on CRC matching to identify packets
>> during a seek. While other containers have more advanced sync mechanisms beyond a simple
>> syncword and checksum, that's all we have here.
>> What's worse, we need to be able to handle concatenated ogg files (chained opus, vorbis, etc.),
>> which are widely used on internet radios. Those have the extradata needed to configure the decoder
>> on the first packet. If we skip the CRC and misidentify a packet as a header, we'll misconfigure the
>> decoder and break decoding until the next actual header arrives, which could be many minutes.
>> The whole chained ogg mechanism is already fragile enough as it unfortunately is.
>>
>
> Sorry yes that make sense. I meant more that AV_EF_CRCCHECK seems to
> be set by default so adding a
> conditionally check would be if someone for some reason really want to
> skip it using -err_detect 0 or so.
>

Well, I consider CRC checking a part of correctly parsing ogg, so I think its best to leave it on
all the time.


More information about the ffmpeg-devel mailing list