[FFmpeg-devel] [PATCH] avocdec/flac_parser: another fix

Mattias Wadman mattias.wadman at gmail.com
Wed Sep 7 13:31:11 EEST 2022


On Mon, Sep 5, 2022 at 8:16 PM Paul B Mahol <onemda at gmail.com> wrote:

> Patch attached.
>

Thanks and can confirm that the patch produces the same samples as the flac
reference decoder for the original file in
https://trac.ffmpeg.org/ticket/9621 that I could not share.

But I'm not sure I follow how the patch works. I read it as we skip
checking CRC if the current frame or sample number is the expected next one?

+    if ((fpc->last_fi.frame_or_sample_num + 1 ==
header_fi->frame_or_sample_num) ||
+        (fpc->last_fi.frame_or_sample_num + fpc->last_fi.blocksize ==
header_fi->frame_or_sample_num)) {

Would it make sense to look at the blocking strategy bit to know which one
to check?


More information about the ffmpeg-devel mailing list