[FFmpeg-devel] [PATCH]lavc/dvbsub: Do not fail on clut depth 0

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Aug 4 13:31:10 CEST 2015


Hi!

Attached patch fixes the regression reported in ticket #4752, the subtitles 
look very bad before and after but I guess this should be a different ticket.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index ce03e12..23f24f1 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -1168,7 +1168,7 @@ static int dvbsub_parse_clut_segment(AVCodecContext *avctx,
 
         if (depth == 0) {
             av_log(avctx, AV_LOG_ERROR, "Invalid clut depth 0x%x!\n", *buf);
-            return AVERROR_INVALIDDATA;
+            return 0;
         }
 
         full_range = (*buf++) & 1;


More information about the ffmpeg-devel mailing list