diff options
author | Thiago Santos <thiago.sousa.santos@collabora.com> | 2012-08-28 21:01:55 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.com> | 2012-08-29 15:45:05 -0300 |
commit | 9ff5b6bcbe7ce57dabe580b1bceaff425bf42f3c (patch) | |
tree | 8e05042238deb00184905cbaca31211e3fb0dd7f /gst/camerabin2 | |
parent | 8c3c7ee47a70b1e88dded9135d6826861d783abf (diff) | |
download | gstreamer-plugins-bad-9ff5b6bcbe7ce57dabe580b1bceaff425bf42f3c.tar.gz |
camerabin: request _%u templates instead of _%d
In 1.0, templates have been renamed to _%u as default
Diffstat (limited to 'gst/camerabin2')
-rw-r--r-- | gst/camerabin2/gstcamerabin2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index 27c00c045..13a19015e 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -1261,7 +1261,12 @@ encodebin_find_pad (GstCameraBin2 * camera, GstElement * encodebin, klass = GST_ELEMENT_GET_CLASS (encodebin); tmpl = gst_element_class_get_pad_template (klass, pad_type == VIDEO_PAD ? - "video_%d" : "audio_%d"); + "video_%u" : "audio_%u"); + + if (!tmpl) { + GST_DEBUG_OBJECT (camera, "No templates found, can't request pad"); + return NULL; + } pad = gst_element_request_pad (encodebin, tmpl, NULL, NULL); GST_DEBUG_OBJECT (camera, "Got pad: %s", pad ? GST_PAD_NAME (pad) : "null"); |