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:
Edward Hervey 2013-12-20 08:41:45 -05:00 committed by Edward Hervey
parent 86b0a0d6d0
commit b97c711def
2 changed files with 2 additions and 0 deletions

View file

@ -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;

View file

@ -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[] = {