Commit 443502ae authored by Vittorio Giovara's avatar Vittorio Giovara

dvbsubdec: move shared codepath

CC: libav-stable@libav.org
Bug-Id: CID 1238839
parent 23833236
......@@ -693,26 +693,19 @@ static int dvbsub_read_8bit_string(uint8_t *destbuf, int dbuf_len,
if (run_length == 0) {
return pixels_read;
}
if (map_table)
bits = map_table[0];
else
bits = 0;
while (run_length-- > 0 && pixels_read < dbuf_len) {
*destbuf++ = bits;
pixels_read++;
}
} else {
bits = *(*srcbuf)++;
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++;
}
}
if (map_table)
bits = map_table[0];
else
bits = 0;
while (run_length-- > 0 && pixels_read < dbuf_len) {
*destbuf++ = bits;
pixels_read++;
}
}
}
......
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