diff options
author | James Almer <jamrial@gmail.com> | 2023-07-11 23:04:10 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-07-12 10:34:42 -0300 |
commit | e6954fd087d4b36cae6834e2c6b423db604f569b (patch) | |
tree | 15e682b707c6e8617a0d3fd7ca61a53e17fd192c /libavcodec/decode.c | |
parent | 02aeacbb5e77f1c760031dc6426a46671c6d220a (diff) | |
download | ffmpeg-e6954fd087d4b36cae6834e2c6b423db604f569b.tar.gz |
avcodec/decode: don't reject flush packets when buffer_pkt is not empty
Restores the behavior before commit a92dbeb9ae.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/decode.c')
-rw-r--r-- | libavcodec/decode.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index a47abeca06..239ad70b41 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -666,10 +666,9 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke if (avpkt && !avpkt->size && avpkt->data) return AVERROR(EINVAL); - if (!AVPACKET_IS_EMPTY(avci->buffer_pkt)) - return AVERROR(EAGAIN); - if (avpkt && (avpkt->data || avpkt->side_data_elems)) { + if (!AVPACKET_IS_EMPTY(avci->buffer_pkt)) + return AVERROR(EAGAIN); ret = av_packet_ref(avci->buffer_pkt, avpkt); if (ret < 0) return ret; |