From 8f7a043609554fd5e6917afeaed5d95bca420859 Mon Sep 17 00:00:00 2001 From: Jun Zhao Date: Sat, 15 Jun 2019 16:19:18 +0800 Subject: [PATCH] lavf/mpegtsenc: fix logic check error fix the logic check error fix #6751 Reviewed-by: Andriy Gelman Signed-off-by: Jun Zhao --- libavformat/mpegtsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 0678657d09..9f8f1715c9 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);