Commit 63db6a02 authored by James Almer's avatar James Almer

avformat/concatdec: check that there's extradata before trying to copy it

The first argument for memcpy must not be NULL.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent cb925c0b
......@@ -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)
......
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