mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/decode: Return EAGAIN instead of discarding unused packet
Should fix #10457, a regression caused by
69516ab3e9.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
f6dc85ae16
commit
a92dbeb9ae
1 changed files with 3 additions and 1 deletions
|
|
@ -666,7 +666,9 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke
|
||||||
if (avpkt && !avpkt->size && avpkt->data)
|
if (avpkt && !avpkt->size && avpkt->data)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
av_packet_unref(avci->buffer_pkt);
|
if (!AVPACKET_IS_EMPTY(avci->buffer_pkt))
|
||||||
|
return AVERROR(EAGAIN);
|
||||||
|
|
||||||
if (avpkt && (avpkt->data || avpkt->side_data_elems)) {
|
if (avpkt && (avpkt->data || avpkt->side_data_elems)) {
|
||||||
ret = av_packet_ref(avci->buffer_pkt, avpkt);
|
ret = av_packet_ref(avci->buffer_pkt, avpkt);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue