mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/buffersrc: uninitialize the context ch_layout before overwritting it
av_buffersrc_parameters_set() can be called to set paramenters after the filter was initialized with for example avfilter_graph_create_filter(). Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
c2d1597a8a
commit
4a8f932fd9
|
@ -132,6 +132,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
|||
// if the old/new fields are set inconsistently, prefer the old ones
|
||||
if (param->channel_layout && (param->ch_layout.order != AV_CHANNEL_ORDER_NATIVE ||
|
||||
param->ch_layout.u.mask != param->channel_layout)) {
|
||||
av_channel_layout_uninit(&s->ch_layout);
|
||||
av_channel_layout_from_mask(&s->ch_layout, param->channel_layout);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue