[FFmpeg-devel] [PATCH 1/6] movtextdec: fix decode return value for emtpy skipped subtitles

Marton Balint cus at passwd.hu
Sat Oct 5 19:34:53 CEST 2013


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavcodec/movtextdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 05ff53a..82cf2b8 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -76,7 +76,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
      * bad packet.
      */
     if (avpkt->size == 2)
-        return AV_RB16(ptr) == 0 ? 0 : AVERROR_INVALIDDATA;
+        return AV_RB16(ptr) == 0 ? avpkt->size : AVERROR_INVALIDDATA;
 
     /*
      * The first two bytes of the packet are the length of the text string
-- 
1.8.1.4



More information about the ffmpeg-devel mailing list