[FFmpeg-devel] [PATCH 2/6] srtdec: always return INVALIDDATA for <= 0 sized packets

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


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

diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c
index b16645a..59de977 100644
--- a/libavcodec/srtdec.c
+++ b/libavcodec/srtdec.c
@@ -234,7 +234,7 @@ static int srt_decode_frame(AVCodecContext *avctx,
     }
 
     if (avpkt->size <= 0)
-        return avpkt->size;
+        return AVERROR_INVALIDDATA;
 
     while (ptr < end && *ptr) {
         if (avctx->codec->id == AV_CODEC_ID_SRT) {
-- 
1.8.1.4



More information about the ffmpeg-devel mailing list