mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-20 13:26:39 +00:00
avformat/utils: Fix undefined NULL + 0
This is undefined behaviour in C, so use data = len ? data + len : data instead of data += len. GCC optimizes the branch away in this case; Clang unfortunately doesn't. Fixes ticket #8592. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
4f49ca7bbc
commit
9c0b3eddf4
@ -1426,7 +1426,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt,
|
||||
pkt->pts = pkt->dts = AV_NOPTS_VALUE;
|
||||
pkt->pos = -1;
|
||||
/* increment read pointer */
|
||||
data += len;
|
||||
data = len ? data + len : data;
|
||||
size -= len;
|
||||
|
||||
got_output = !!out_pkt.size;
|
||||
|
Loading…
Reference in New Issue
Block a user