[FFmpeg-cvslog] avcodec/mediacodecdec: Skip dequeue buffer in draining state
Zhao Zhili
git at videolan.org
Mon Aug 26 12:01:03 EEST 2024
ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Sat Aug 24 01:19:38 2024 +0800| [aa14f9fe63bf6e13054da98ec6420cca30de98ef] | committer: Zhao Zhili
avcodec/mediacodecdec: Skip dequeue buffer in draining state
There is no more packet to queue in draining state.
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa14f9fe63bf6e13054da98ec6420cca30de98ef
---
libavcodec/mediacodecdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
More information about the ffmpeg-cvslog
mailing list