You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/dtsdec: Extend DTS core sync word
Check extended sync word for 16-bit LE and BE core streams to reduce probability of alias sync detection. Previously sync word extension was checked only for 14-bit streams. This follows up the similar change in avcodec/dca_parser. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
e2877bdf38
commit
191dd219d9
@@ -50,9 +50,11 @@ static int dts_probe(AVProbeData *p)
|
|||||||
diff += FFABS(((int16_t)AV_RL16(buf)) - (int16_t)AV_RL16(buf-4));
|
diff += FFABS(((int16_t)AV_RL16(buf)) - (int16_t)AV_RL16(buf-4));
|
||||||
|
|
||||||
/* regular bitstream */
|
/* regular bitstream */
|
||||||
if (state == DCA_SYNCWORD_CORE_BE)
|
if (state == DCA_SYNCWORD_CORE_BE &&
|
||||||
|
(bytestream_get_be16(&bufp) & 0xFC00) == 0xFC00)
|
||||||
marker = 0;
|
marker = 0;
|
||||||
else if (state == DCA_SYNCWORD_CORE_LE)
|
else if (state == DCA_SYNCWORD_CORE_LE &&
|
||||||
|
(bytestream_get_be16(&bufp) & 0x00FC) == 0x00FC)
|
||||||
marker = 1;
|
marker = 1;
|
||||||
|
|
||||||
/* 14 bits big-endian bitstream */
|
/* 14 bits big-endian bitstream */
|
||||||
|
Reference in New Issue
Block a user