From e62340c8a4bedc039e038003b9c04437d37009e8 Mon Sep 17 00:00:00 2001
From: wang-bin <wbsecg1@gmail.com>
Date: Sat, 11 Feb 2023 16:04:05 +0800
Subject: [PATCH] avcodec/ccaption_dec: return the number of bytes decoded

---
 libavcodec/ccaption_dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 61eda9ff56..661a4951a4 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -922,7 +922,7 @@ static int decode(AVCodecContext *avctx, AVSubtitle *sub,
     }
 
     *got_sub = sub->num_rects > 0;
-    return ret;
+    return avpkt->size;
 }
 
 #define OFFSET(x) offsetof(CCaptionSubContext, x)
-- 
2.37.1 (Apple Git-137.1)

