diff options
author | Gyan Doshi <ffmpeg@gyani.pro> | 2024-03-16 10:04:54 +0530 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2024-03-16 14:30:05 +0530 |
commit | f5441e441f9b0d235e49bdccc69e141ccd92e854 (patch) | |
tree | b5d1f99929728cbfa9ae59650a392f1fef2b5339 /libavformat | |
parent | aca7037e018d15e2955f28967c806af079a4075d (diff) | |
download | ffmpeg-f5441e441f9b0d235e49bdccc69e141ccd92e854.tar.gz |
avformat/mpegtsenc: correct bitstream check
8559cce3c3 made the bitstream check generic using a LUT.
However, one of the comparisons which involves a bitwise AND
and equality check is faulty due to operator precedence.
First reported and analysed at
https://github.com/streamlink/streamlink/issues/5876
Fixes #10908
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegtsenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 06e88e9879..b8efc535a7 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -2319,7 +2319,7 @@ static int mpegts_check_bitstream(AVFormatContext *s, AVStream *st, pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 && (AV_RB24(pkt->data) != 0x000001 || (st->codecpar->extradata_size > 0 && - (st->codecpar->extradata[0] & e->mask == e->value)))) + ((st->codecpar->extradata[0] & e->mask) == e->value)))) return ff_stream_add_bitstream_filter(st, e->bsf_name, NULL); } return 1; |