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
@ -131,6 +131,7 @@ gst_audio_info_set_format (GstAudioInfo * info, GstAudioFormat format,
|
|||||||
info->bpf = (finfo->width * channels) / 8;
|
info->bpf = (finfo->width * channels) / 8;
|
||||||
|
|
||||||
memset (&info->position, 0xff, sizeof (info->position));
|
memset (&info->position, 0xff, sizeof (info->position));
|
||||||
|
memset (&info->_gst_reserved, 0xff, sizeof (info->_gst_reserved));
|
||||||
|
|
||||||
if (!position && channels == 1) {
|
if (!position && channels == 1) {
|
||||||
info->position[0] = GST_AUDIO_CHANNEL_POSITION_MONO;
|
info->position[0] = GST_AUDIO_CHANNEL_POSITION_MONO;
|
||||||
|
@ -110,6 +110,7 @@ gst_video_info_set_format (GstVideoInfo * info, GstVideoFormat format,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fill_planes (info);
|
fill_planes (info);
|
||||||
|
memset (&info->_gst_reserved, 0xff, sizeof (info->_gst_reserved));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const gchar *interlace_mode[] = {
|
static const gchar *interlace_mode[] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user