From: Jun Zhao Date: Sat, 15 Jun 2019 08:19:18 +0000 (+0800) Subject: lavf/mpegtsenc: fix logic check error X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8f7a043609554fd5e6917afeaed5d95bca420859;p=ffmpeg lavf/mpegtsenc: fix logic check error fix the logic check error fix #6751 Reviewed-by: Andriy Gelman Signed-off-by: Jun Zhao --- diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 0678657d094..9f8f1715c9f 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1642,7 +1642,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) } while (p < buf_end && (state & 0x7e) != 2*35 && (state & 0x7e) >= 2*32); - if ((state & 0x7e) < 2*16 && (state & 0x7e) >= 2*24) + if ((state & 0x7e) < 2*16 || (state & 0x7e) >= 2*24) extradd = 0; if ((state & 0x7e) != 2*35) { // AUD NAL data = av_malloc(pkt->size + 7 + extradd);