History

avcodec/mediacodecdec: Skip dequeue buffer in draining state

There is no more packet to queue in draining state.

Zhao Zhili committed 2 years ago

Commit aa14f9f1 parent 2e370801 file · +1 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/mediacodecdec.c+1−1
@@ -462,7 +462,7 @@ static int mediacodec_receive_frame(AVCodecContext *avctx, AVFrame *frame) · 461 unmodified lines
462 462
463 /* feed decoder */463 /* feed decoder */
464 while (1) {464 while (1) {
465 if (s->ctx->current_input_buffer < 0) {465 if (s->ctx->current_input_buffer < 0 && !s->ctx->draining) {
466 /* poll for input space */466 /* poll for input space */
467 index = ff_AMediaCodec_dequeueInputBuffer(s->ctx->codec, 0);467 index = ff_AMediaCodec_dequeueInputBuffer(s->ctx->codec, 0);
468 if (index < 0) {468 if (index < 0) {

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