[FFmpeg-devel] [PATCH 4/4] movtextdec: Don't emit errors for normal duration-end packets.
Philip Langdale
philipl at overt.org
Sun Aug 12 23:26:29 CEST 2012
The logic here was off. If the packet size is exactly two, then
it's a well-formed empty subtitle, used to mark the end of the
duration of the previous subtitle.
Signed-off-by: Philip Langdale <philipl at overt.org>
---
libavcodec/movtextdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 52668e2..edaeac0 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -66,7 +66,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
const char *end;
if (!ptr || avpkt->size <= 2)
- return avpkt->size ? AVERROR_INVALIDDATA : 0;
+ return avpkt->size < 2 ? AVERROR_INVALIDDATA : 0;
/*
* The first two bytes of the packet are the length of the text string
--
1.7.9.5
More information about the ffmpeg-devel
mailing list