There is no more packet to queue in draining state.
Unified · Split
| @@ -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) { |