avcodec/dvbsubdec: Fix 8bit non_mod case

Untested, i failed to find a sample which triggers this case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/95/head
Michael Niedermayer 11 years ago
parent 2813dabdd4
commit e0c36f5825
  1. 12
      libavcodec/dvbsubdec.c

@ -741,11 +741,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++;
}
}
}
}

Loading…
Cancel
Save