felipec gst-openmax: gst-openmax/omx/

[email protected] Mon, 8 Dec 2008 13:11:11 -0800 (PST)
Newsgroups gmane.comp.video.gstreamer.cvs
Message-ID <[email protected]>
CVS Root:       /cvs/gstreamer
Module:         gst-openmax
Changes by:     felipec
Date:           Mon Dec 08 2008  21:11:11 UTC

Log message:
Random cleanups.

Modified files:
    omx             : gstomx_g711enc.c gstomx_ilbcenc.c

Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-openmax/omx/gstomx_g711enc.c.diff?r1=1.9&r2=1.10
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-openmax/omx/gstomx_ilbcenc.c.diff?r1=1.6&r2=1.7

====Begin Diffs====
Index: gstomx_g711enc.c
===================================================================
RCS file: /cvs/gstreamer/gst-openmax/omx/gstomx_g711enc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- gstomx_g711enc.c	8 Dec 2008 21:10:20 -0000	1.9
+++ gstomx_g711enc.c	8 Dec 2008 21:10:57 -0000	1.10
@@ -146,6 +146,9 @@
 
     structure = gst_caps_get_structure (peer_caps, 0);
+    if (!structure)
+        goto leave;
+
     mode = gst_structure_get_name (structure);
     /* Output port configuration. */
@@ -170,6 +173,8 @@
         free (param);
     }
+leave:
     /* set caps on the srcpad */
     {
         GstCaps *tmp_caps;
Index: gstomx_ilbcenc.c
RCS file: /cvs/gstreamer/gst-openmax/omx/gstomx_ilbcenc.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gstomx_ilbcenc.c	8 Dec 2008 21:10:20 -0000	1.6
+++ gstomx_ilbcenc.c	8 Dec 2008 21:10:57 -0000	1.7
@@ -135,20 +135,14 @@
 sink_setcaps (GstPad *pad,
               GstCaps *caps)
 {
-    GstStructure *structure;
     GstOmxBaseFilter *omx_base;
     GOmxCore *gomx;
-    const gchar *mode;
     omx_base = GST_OMX_BASE_FILTER (GST_PAD_PARENT (pad));
     gomx = (GOmxCore *) omx_base->gomx;
     GST_INFO_OBJECT (omx_base, "setcaps (sink): %" GST_PTR_FORMAT, caps);
-    structure = gst_caps_get_structure (caps, 0);
-
-    mode = gst_structure_get_name (structure);

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/