History

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.

Haihao Xiang committed 2 years ago

Commit e233f3e1 parent 5717fbb1 file · +3 −0Browse files

Unified · Split

libavcodec/qsvdec.c+3−0
@@ -1076,6 +1076,9 @@ static int qsv_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 1075 unmodified lines
10761076
10771077 ret = qsv_process_data(avctx, &s->qsv, frame, got_frame, &s->buffer_pkt);
10781078 if (ret < 0){
1079+ if (ret == AVERROR(EAGAIN))
1080+ ret = 0;
1081+
10791082 /* Drop buffer_pkt when failed to decode the packet. Otherwise,
10801083 the decoder will keep decoding the failure packet. */
10811084 av_packet_unref(&s->buffer_pkt);

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