>From 4d0c3bd0314856e0e04ecec86db5d84a1af83769 Mon Sep 17 00:00:00 2001
From: huxiao <[email protected]>
Date: Tue, 19 May 2026 17:09:27 +0800
Subject: [PATCH] fix: The frame fragmentation processing in the OHOS
platform
 adds AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME

Signed-off-by: huxiao <[email protected]>
---
 libavcodec/ohdec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/ohdec.c b/libavcodec/ohdec.c
index cf1177afcd..f6b83b9ecc 100644
--- a/libavcodec/ohdec.c
+++ b/libavcodec/ohdec.c
@@ -611,6 +611,10 @@ static int oh_decode_send_pkt(AVCodecContext *avctx,
OHBufferQueueItem *input)
                      ? AVCODEC_BUFFER_FLAGS_SYNC_FRAME : 0,
     };

+    if (n < s->pkt.size) {
+        attr.flags |= AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME;
+    }
+
     err = OH_AVBuffer_SetBufferAttr(input->buffer, &attr);
     if (err != AV_ERR_OK) {
         ret = ff_oh_err_to_ff_err(err);
-- 
2.25.1
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to