[FFmpeg-cvslog] avfilter/buffersrc: uninitialize the context ch_layout before overwritting it
James Almer
git at videolan.org
Mon Mar 28 04:26:04 EEST 2022
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Mar 22 18:30:41 2022 -0300| [4a8f932fd913d24aa46c9b5784b6e4980567c3ea] | committer: James Almer
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 at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a8f932fd913d24aa46c9b5784b6e4980567c3ea
---
libavfilter/buffersrc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index c8521d41b5..a3190468bb 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -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
More information about the ffmpeg-cvslog
mailing list