16 lines
604 B
Diff
16 lines
604 B
Diff
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
|
|
index da700f25e9..b501964089 100644
|
|
--- a/libavcodec/qsvdec.c
|
|
+++ b/libavcodec/qsvdec.c
|
|
@@ -1076,6 +1076,9 @@ static int qsv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
|
|
|
ret = qsv_process_data(avctx, &s->qsv, frame, got_frame, &s->buffer_pkt);
|
|
if (ret < 0){
|
|
+ if (ret == AVERROR(EAGAIN))
|
|
+ ret = 0;
|
|
+
|
|
/* Drop buffer_pkt when failed to decode the packet. Otherwise,
|
|
the decoder will keep decoding the failure packet. */
|
|
av_packet_unref(&s->buffer_pkt);
|
|
|