Commit e0c36f58 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dvbsubdec: Fix 8bit non_mod case

Untested, i failed to find a sample which triggers this case
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2813dabd
......@@ -741,15 +741,17 @@ static int dvbsub_read_8bit_string(uint8_t *destbuf, int dbuf_len,
if (non_mod == 1 && bits == 1)
pixels_read += run_length;
else {
if (map_table)
bits = map_table[bits];
else while (run_length-- > 0 && pixels_read < dbuf_len) {
while (run_length-- > 0 && pixels_read < dbuf_len) {
*destbuf++ = bits;
pixels_read++;
}
}
}
}
}
if (*(*srcbuf)++)
av_log(0, AV_LOG_ERROR, "DVBSub error: line overflow\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment