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

Unified · Split

libavcodec/mediacodecdec.c+1−1
@@ -462,7 +462,7 @@ static int mediacodec_receive_frame(AVCodecContext *avctx, AVFrame *frame) · 461 unmodified lines
462462
463463 /* feed decoder */
464464 while (1) {
465− if (s->ctx->current_input_buffer < 0) {
465+ if (s->ctx->current_input_buffer < 0 && !s->ctx->draining) {
466466 /* poll for input space */
467467 index = ff_AMediaCodec_dequeueInputBuffer(s->ctx->codec, 0);
468468 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