ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Fri Dec 27 11:53:16 
2024 -0300| [0bed1b89530042f0a835b8d1178aa52b40a751f6] | committer: James Almer

avutil/downmix_info: zero the allocated buffer

Signed-off-by: James Almer <jamr...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0bed1b89530042f0a835b8d1178aa52b40a751f6
---

 libavutil/downmix_info.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavutil/downmix_info.c b/libavutil/downmix_info.c
index c634c6a79f..feaee28493 100644
--- a/libavutil/downmix_info.c
+++ b/libavutil/downmix_info.c
@@ -27,9 +27,11 @@ AVDownmixInfo *av_downmix_info_update_side_data(AVFrame 
*frame)
 
     side_data = av_frame_get_side_data(frame, AV_FRAME_DATA_DOWNMIX_INFO);
 
-    if (!side_data)
+    if (!side_data) {
         side_data = av_frame_new_side_data(frame, AV_FRAME_DATA_DOWNMIX_INFO,
                                            sizeof(AVDownmixInfo));
+        memset(side_data->data, 0, sizeof(AVDownmixInfo));
+    }
 
     if (!side_data)
         return NULL;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to