summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-11 23:06:44 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-11 23:08:55 +0100
commit287eb69973f8066a68e924bdf9433b2faad01dfa (patch)
treee9741a866e820b7758d4f495be1a911544555dee /libavcodec/dvbsubdec.c
parente0c36f58257f015296a391c5bac763f1aec9a6e2 (diff)
parent443502aed8b814d883825e52e91e4f018955aa66 (diff)
downloadffmpeg-287eb69973f8066a68e924bdf9433b2faad01dfa.tar.gz
Merge commit '443502aed8b814d883825e52e91e4f018955aa66'
* commit '443502aed8b814d883825e52e91e4f018955aa66': dvbsubdec: move shared codepath Conflicts: libavcodec/dvbsubdec.c The merged code is ignored and the factorization redone with the code that is in FFmpeg. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 0b373e976c..738bd5a43f 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -728,27 +728,19 @@ static int dvbsub_read_8bit_string(uint8_t *destbuf, int dbuf_len,
return pixels_read;
}
+ bits = 0;
+ } else {
+ bits = *(*srcbuf)++;
+ }
+ if (non_mod == 1 && bits == 1)
+ pixels_read += run_length;
+ else {
if (map_table)
- bits = map_table[0];
- else
- bits = 0;
+ bits = map_table[bits];
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;
- else {
- if (map_table)
- bits = map_table[bits];
- while (run_length-- > 0 && pixels_read < dbuf_len) {
- *destbuf++ = bits;
- pixels_read++;
- }
- }
}
}
}