| | 12 | |
| | 13 | \\ |
| | 14 | ͏ @ 2025-05-14T23:23:41Z |
| | 15 | ͏ fftools/ffmpeg_dec: Always receive frames from decoder |
| | 16 | https://github.com/FFmpeg/FFmpeg/commit/b18aaf209f007e67ac4490ba5647ea139d1a6dcb |
| | 17 | ͏ “Up until now, if "avcodec_send_packet" returned an error: no attempt to receive a frame from the decoder would be made. |
| | 18 | ͏ Instead the decoder was presumed to be drained, so that more packets could be sent to it. |
| | 19 | ͏ Yet this need not be so: |
| | 20 | ͏ It can happen that a packet would decode to multiple frames. |
| | 21 | ͏ And that decoding the 1st of these (the one that is decoded during the "avcodec_send_packet" call) returns an error. |
| | 22 | ͏ . |
| | 23 | ͏ In which case the decoder is not yet ready to receive more input: |
| | 24 | ͏ As the remaining parts of the packet have not been decoded yet. |
| | 25 | ͏ In this case, an "AVERROR_BUG" is triggered. |
| | 26 | |
| | 27 | ͏ This happens in ticket #11553 with VP9: |
| | 28 | ͏ Which uses a BSF to split VP9 superframes; and is therefore affected by this. |
| | 29 | |
| | 30 | ͏ Fix this by always calling "avcodec_receive_frame" unless "-xerror" is set.” |