Commit 8f7a0436 authored by Jun Zhao's avatar Jun Zhao

lavf/mpegtsenc: fix logic check error

fix the logic check error

fix #6751
Reviewed-by: 's avatarAndriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent a8ec0685
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment