queue: get caps after making writable
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 5 Aug 2009 11:47:33 +0000 (13:47 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 6 Aug 2009 08:52:56 +0000 (10:52 +0200)
Get the caps of the buffer after we made the buffer writable. This did not
cause any problems but it's nicer this way.

plugins/elements/gstqueue.c

index 175fc6b..20380af 100644 (file)
@@ -1021,7 +1021,6 @@ next:
     GstCaps *caps;
 
     buffer = GST_BUFFER_CAST (data);
-    caps = GST_BUFFER_CAPS (buffer);
 
     if (queue->head_needs_discont) {
       GstBuffer *subbuffer = gst_buffer_make_metadata_writable (buffer);
@@ -1035,6 +1034,8 @@ next:
       queue->head_needs_discont = FALSE;
     }
 
+    caps = GST_BUFFER_CAPS (buffer);
+
     GST_QUEUE_MUTEX_UNLOCK (queue);
     /* set the right caps on the pad now. We do this before pushing the buffer
      * because the pad_push call will check (using acceptcaps) if the buffer can