Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-31 15:25:43 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-11-12 00:57:01 +0300
commite0c36f58257f015296a391c5bac763f1aec9a6e2 (patch)
tree9a9fcc57fa735e4ac286c6bf0280e9138b45684a /libavcodec/dvbsubdec.c
parent2813dabdd4964ab37f8b0cea42f49531931c9006 (diff)
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>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index b1f953e8f9..0b373e976c 100644
--- a/libavcodec/dvbsubdec.c
+++ b/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++;
+ }
}
}
}