mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00:00
avcodec/ccaption_dec: do not modify pkt data and stop removing parity bit twice
This commit is contained in:
parent
5422a4a7c5
commit
c0974355c7
@ -367,10 +367,6 @@ static int validate_cc_data_pair(uint8_t *cc_data_pair)
|
|||||||
if (cc_type == 3 || cc_type == 2)
|
if (cc_type == 3 || cc_type == 2)
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
|
|
||||||
/* remove parity bit */
|
|
||||||
cc_data_pair[1] &= 0x7F;
|
|
||||||
cc_data_pair[2] &= 0x7F;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -799,9 +795,8 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
|
|||||||
/* ignoring data field 1 */
|
/* ignoring data field 1 */
|
||||||
if (cc_type == 1)
|
if (cc_type == 1)
|
||||||
continue;
|
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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user