[FFmpeg-cvslog] lavf/mpegtsenc: fix logic check error
Jun Zhao
git at videolan.org
Mon Nov 4 04:27:33 EET 2019
ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Sat Jun 15 16:19:18 2019 +0800| [8f7a043609554fd5e6917afeaed5d95bca420859] | committer: Jun Zhao
lavf/mpegtsenc: fix logic check error
fix the logic check error
fix #6751
Reviewed-by: Andriy Gelman <andriy.gelman at gmail.com>
Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f7a043609554fd5e6917afeaed5d95bca420859
---
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);
More information about the ffmpeg-cvslog
mailing list