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
7878 codec_parameters_reset(dst);
7979 memcpy(dst, src, sizeof(*dst));
8080
81+ dst->ch_layout = (AVChannelLayout){0};
8182 dst->extradata = NULL;
8283 dst->extradata_size = 0;
8384 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