History

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.

Marton Balint committed 4 years ago

Commit ef2b3ef1 parent 93a076d1 file · +1 −0Browse files

Showing the changes to libavcodec/codec_par.c (1 of 1 file). Show all

Unified · Split

libavcodec/codec_par.c+1−0
@@ -78,6 +78,7 @@ int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src · 77 unmodified lines
78 codec_parameters_reset(dst);78 codec_parameters_reset(dst);
79 memcpy(dst, src, sizeof(*dst));79 memcpy(dst, src, sizeof(*dst));
80 80
81 dst->ch_layout = (AVChannelLayout){0};
81 dst->extradata = NULL;82 dst->extradata = NULL;
82 dst->extradata_size = 0;83 dst->extradata_size = 0;
83 if (src->extradata) {84 if (src->extradata) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t