History

avcodec/decode: Return EAGAIN instead of discarding unused packet

Should fix #10457, a regression caused by 69516ab3e917a6e91d26e38d04183c60fd71cbab.

Andreas Rheinhardt committed 3 years ago

Commit a92dbeb1 parent f6dc85a1 file · +3 −1Browse files

Unified · Split

libavcodec/decode.c+3−1
@@ -666,7 +666,9 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke · 665 unmodified lines
666 if (avpkt && !avpkt->size && avpkt->data)666 if (avpkt && !avpkt->size && avpkt->data)
667 return AVERROR(EINVAL);667 return AVERROR(EINVAL);
668 668
669 av_packet_unref(avci->buffer_pkt);669 if (!AVPACKET_IS_EMPTY(avci->buffer_pkt))
670 return AVERROR(EAGAIN);
671
670 if (avpkt && (avpkt->data || avpkt->side_data_elems)) {672 if (avpkt && (avpkt->data || avpkt->side_data_elems)) {
671 ret = av_packet_ref(avci->buffer_pkt, avpkt);673 ret = av_packet_ref(avci->buffer_pkt, avpkt);
672 if (ret < 0)674 if (ret < 0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t