queue: get caps after making writable

Get the caps of the buffer after we made the buffer writable. This did not
cause any problems but it's nicer this way.
This commit is contained in:
Wim Taymans 2009-08-05 13:47:33 +02:00
parent 04f3f096c3
commit 49f24e2044

View file

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