Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
lavf/mpegtsenc: fix logic check error
fix the logic check error

fix #6751

Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
  • Loading branch information
mypopydev committed Nov 4, 2019
1 parent a8ec068 commit 8f7a043
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavformat/mpegtsenc.c
Expand Up @@ -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);
Expand Down

0 comments on commit 8f7a043

Please sign in to comment.