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>
This commit is contained in:
parent
5717fbbea2
commit
e233f3e75f
@ -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…
x
Reference in New Issue
Block a user