Files
Andreas Rheinhardt b18aaf209f fftools/ffmpeg_dec: Always receive frames from decoder
Up until now if avcodec_send_packet() returned an error,
no attempt to receive a frame from the decoder would be made.
Instead the decoder was presumed to be drained, so that more
packets could be sent to it. Yet this need not be so:
It can happen that a packet would decode to multiple frames
and that decoding the first of these (the one that is decoded
during the avcodec_send_packet() call) returns an error,
in which case the decoder is not yet ready to receive more
input as the remaining parts of the packet have not been decoded
yet. In this case, an AERROR_BUG is triggered.

This happens in ticket #11553 with VP9 (which uses a BSF
to split VP9 superframes and is therefore affected by this).

Fix this by always calling avcodec_receive_frame() unless
xerror is set.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-15 01:23:41 +02:00
..
2025-05-07 15:35:47 +02:00
2025-05-07 15:35:47 +02:00