mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
audio/video: Initialize all {audio|video}info fields
Fixes "Unitialized Scalar Variable" issues reported by Coverity. Has the added advantage of detecting whether somebody *does* use those fields (ending up with a invalid address). https://bugzilla.gnome.org/show_bug.cgi?id=720810
This commit is contained in:
parent
86b0a0d6d0
commit
b97c711def
2 changed files with 2 additions and 0 deletions
|
@ -131,6 +131,7 @@ gst_audio_info_set_format (GstAudioInfo * info, GstAudioFormat format,
|
|||
info->bpf = (finfo->width * channels) / 8;
|
||||
|
||||
memset (&info->position, 0xff, sizeof (info->position));
|
||||
memset (&info->_gst_reserved, 0xff, sizeof (info->_gst_reserved));
|
||||
|
||||
if (!position && channels == 1) {
|
||||
info->position[0] = GST_AUDIO_CHANNEL_POSITION_MONO;
|
||||
|
|
|
@ -110,6 +110,7 @@ gst_video_info_set_format (GstVideoInfo * info, GstVideoFormat format,
|
|||
}
|
||||
|
||||
fill_planes (info);
|
||||
memset (&info->_gst_reserved, 0xff, sizeof (info->_gst_reserved));
|
||||
}
|
||||
|
||||
static const gchar *interlace_mode[] = {
|
||||
|
|
Loading…
Reference in a new issue