gst/gstpad.c: Avoid getting the acceptcaps function too early.
authorWim Taymans <wim.taymans@gmail.com>
Fri, 21 Nov 2008 16:48:48 +0000 (16:48 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 21 Nov 2008 16:48:48 +0000 (16:48 +0000)
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_accept_caps):
Avoid getting the acceptcaps function too early.

ChangeLog
gst/gstpad.c

index 36cb7a5..3dd9ee9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-11-21  Wim Taymans  <wim.taymans@collabora.co.uk>
 
+       * gst/gstpad.c: (gst_pad_accept_caps):
+       Avoid getting the acceptcaps function too early.
+
+2008-11-21  Wim Taymans  <wim.taymans@collabora.co.uk>
+
        * tools/gst-launch.c: (event_loop):
        Make gst-launch handle LATENCY messages and make it recalculate the
        latency.
index 57f6b67..c4b6ee8 100644 (file)
@@ -2311,13 +2311,13 @@ gst_pad_accept_caps (GstPad * pad, GstCaps * caps)
 
   /* lock for checking the existing caps */
   GST_OBJECT_LOCK (pad);
-  acceptfunc = GST_PAD_ACCEPTCAPSFUNC (pad);
   GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "accept caps of %p", caps);
   /* The current caps on a pad are trivially acceptable */
   if (G_LIKELY ((existing = GST_PAD_CAPS (pad)))) {
     if (caps == existing || gst_caps_is_equal (caps, existing))
       goto is_same_caps;
   }
+  acceptfunc = GST_PAD_ACCEPTCAPSFUNC (pad);
   GST_OBJECT_UNLOCK (pad);
 
   if (G_LIKELY (acceptfunc)) {