diff options
author | Marton Balint <cus@passwd.hu> | 2022-03-15 15:21:14 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2022-03-15 16:24:52 +0100 |
commit | ef2b3efd5153568989324f01de41ca19bf3afda1 (patch) | |
tree | 71e035f840083853c40c095d5dc98111aa411bf2 /libavcodec | |
parent | 93a076db70b4addf3b1924fb6fc98343035564cb (diff) |
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: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/codec_par.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/codec_par.c b/libavcodec/codec_par.c index e4b329c838..abda649aa8 100644 --- a/libavcodec/codec_par.c +++ b/libavcodec/codec_par.c @@ -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) { |