mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avutil/downmix_info: zero the allocated buffer
Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit0bed1b8953) (cherry picked from commita649b2a831)
This commit is contained in:
@@ -27,9 +27,12 @@ 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));
|
||||
if (side_data)
|
||||
memset(side_data->data, 0, sizeof(AVDownmixInfo))
|
||||
}
|
||||
|
||||
if (!side_data)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user