aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Zhili <zhilizhao@tencent.com>2024-08-24 01:19:38 +0800
committerZhao Zhili <zhilizhao@tencent.com>2024-08-26 16:59:07 +0800
commitaa14f9fe63bf6e13054da98ec6420cca30de98ef (patch)
treea41057ef91faa9aac7271ca6d952af80ca276331
parent2e370805da94ee5a8b3959b0635a3fbdb033125e (diff)
downloadffmpeg-aa14f9fe63bf6e13054da98ec6420cca30de98ef.tar.gz
avcodec/mediacodecdec: Skip dequeue buffer in draining state
There is no more packet to queue in draining state. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
-rw-r--r--libavcodec/mediacodecdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index 6d8dc600fe..0da5fe6729 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -462,7 +462,7 @@ static int mediacodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
/* feed decoder */
while (1) {
- if (s->ctx->current_input_buffer < 0) {
+ if (s->ctx->current_input_buffer < 0 && !s->ctx->draining) {
/* poll for input space */
index = ff_AMediaCodec_dequeueInputBuffer(s->ctx->codec, 0);
if (index < 0) {