fre 2023-03-10 klockan 10:17 +0100 skrev Nicolas Gaullier: > + if (i == c->nb_groups - 1 > + && count * size1 > get_bits_left(&s->gb) > + && get_bits_left(&s->gb) >= 0 > + && (int)(mnt - c->mantissas) >= MIN_MANTISSAS) { > + av_log(s->avctx, AV_LOG_WARNING, "Truncated > mantissas @%d, " > + "highest frequencies not recoverable\n", > (int)(mnt - c->mantissas)); > + break; > + }
Surely there's a proper way to fix this rather than having an arbitrary threshold. At the very least the get_bits_left() check could be moved to before parse_mantissas(). If get_bits_left() is < 0 after parse_mantissas() then a warning could be issued instead of erroring out, which should have an effect similar to this. Is there a spec saying what to do with truncated packets? Since this is Dolby-E I suspect the answer is "no". /Tomas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".