aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-06-17 00:35:37 +0200
committerPaul B Mahol <onemda@gmail.com>2020-06-17 00:38:08 +0200
commitc0974355c7f049eb791ec1d7d5362b700ab51783 (patch)
tree5ae1e630822c5feebc9edbbc98c1679a770fdf2a /libavcodec
parent5422a4a7c5c6c71367937422e753a0d65a60ae21 (diff)
downloadffmpeg-c0974355c7f049eb791ec1d7d5362b700ab51783.tar.gz
avcodec/ccaption_dec: do not modify pkt data and stop removing parity bit twice
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ccaption_dec.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index f73b33a003..87ac23e0d1 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -367,10 +367,6 @@ static int validate_cc_data_pair(uint8_t *cc_data_pair)
if (cc_type == 3 || cc_type == 2)
return AVERROR_PATCHWELCOME;
- /* remove parity bit */
- cc_data_pair[1] &= 0x7F;
- cc_data_pair[2] &= 0x7F;
-
return 0;
}
@@ -799,9 +795,8 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
/* ignoring data field 1 */
if (cc_type == 1)
continue;
- else
- ret = process_cc608(ctx, start_time, *(bptr + i + 1) & 0x7f, *(bptr + i + 2) & 0x7f);
+ ret = process_cc608(ctx, start_time, bptr[i + 1] & 0x7f, bptr[i + 2] & 0x7f);
if (ret < 0)
return ret;