lavc/qsvdec: return 0 if more data is required

The type of qsv decoders is FF_CODEC_CB_TYPE_DECODE which must not
return AVERROR(EAGAIN). commit 42b20c9 added an assertion to check the
returned value.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
(cherry picked from commit e233f3e75f)
pull/390/head
Haihao Xiang 1 year ago
parent 1a3ec3f2f8
commit d596225a57
  1. 3
      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);

Loading…
Cancel
Save