summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2011-01-27 17:46:19 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-01-27 17:47:17 +0100
commit94d448cacead10673eca21c6dfa6f9ecc61ab30b (patch)
treedf8b3f4dba895e5f5991db9db6ec73822b605e65
parent77d789b077f8d9f600982388d5ca46085f7d2266 (diff)
examples: Fix uninitialized variable compiler warning with gcc 4.6
-rw-r--r--tests/examples/concatenate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/examples/concatenate.c b/tests/examples/concatenate.c
index 05084cb2..09194e53 100644
--- a/tests/examples/concatenate.c
+++ b/tests/examples/concatenate.c
@@ -68,7 +68,7 @@ make_profile_from_info (GstDiscovererInfo * info)
/* For each on the formats add stream profiles */
for (tmp = substreams; tmp; tmp = tmp->next) {
GstDiscovererStreamInfo *stream = GST_DISCOVERER_STREAM_INFO (tmp->data);
- GstEncodingProfile *sprof;
+ GstEncodingProfile *sprof = NULL;
if (GST_IS_DISCOVERER_VIDEO_INFO (stream)) {
sprof = (GstEncodingProfile *)
@@ -78,10 +78,12 @@ make_profile_from_info (GstDiscovererInfo * info)
sprof = (GstEncodingProfile *)
gst_encoding_audio_profile_new (gst_discoverer_stream_info_get_caps
(stream), NULL, NULL, 1);
- } else
+ } else {
GST_WARNING ("Unsupported streams");
+ }
- gst_encoding_container_profile_add_profile (profile, sprof);
+ if (sprof)
+ gst_encoding_container_profile_add_profile (profile, sprof);
}
if (substreams)
gst_discoverer_stream_info_list_free (substreams);