Untested, i failed to find a sample which triggers this case Signed-off-by: Michael Niedermayer <michae...@gmx.at> --- libavcodec/dvbsubdec.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index a40da76..1e1cc7e 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -747,11 +747,13 @@ static int dvbsub_read_8bit_string(uint8_t *destbuf, int dbuf_len, if (non_mod == 1 && bits == 1) pixels_read += run_length; - if (map_table) - bits = map_table[bits]; - else while (run_length-- > 0 && pixels_read < dbuf_len) { - *destbuf++ = bits; - pixels_read++; + else { + if (map_table) + bits = map_table[bits]; + while (run_length-- > 0 && pixels_read < dbuf_len) { + *destbuf++ = bits; + pixels_read++; + } } } } -- 1.7.9.5 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel