mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-12 18:31:37 +00:00
avformat/concatdec: check that there's extradata before trying to copy it
The first argument for memcpy must not be NULL. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
cb925c0bc0
commit
63db6a02a7
@ -181,8 +181,9 @@ static int copy_stream_props(AVStream *st, AVStream *source_st)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
memcpy(st->codecpar->extradata, source_st->codecpar->extradata,
|
||||
source_st->codecpar->extradata_size);
|
||||
if (source_st->codecpar->extradata_size)
|
||||
memcpy(st->codecpar->extradata, source_st->codecpar->extradata,
|
||||
source_st->codecpar->extradata_size);
|
||||
return 0;
|
||||
}
|
||||
if ((ret = avcodec_parameters_copy(st->codecpar, source_st->codecpar)) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user