Commit ef2b3efd authored by Marton Balint's avatar Marton Balint

avcodec/codec_par: do not copy AVChannelLayout struct directly

Later we use av_channel_layout_copy, but that uninits the struct
unintentionally freeing the possibly allocated u.map pointer.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 93a076db
......@@ -78,6 +78,7 @@ int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src
codec_parameters_reset(dst);
memcpy(dst, src, sizeof(*dst));
dst->ch_layout = (AVChannelLayout){0};
dst->extradata = NULL;
dst->extradata_size = 0;
if (src->extradata) {
......
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