appsrc: negotiate before popping buffer

First negotiate and then try to pop a buffer from the queue. This is just
to improve the debug log.
This commit is contained in:
Wim Taymans 2013-02-06 10:07:47 +01:00
parent d4ed3ddf6f
commit ed6e7776f3

View file

@ -1008,15 +1008,16 @@ gst_app_src_create (GstBaseSrc * bsrc, guint64 offset, guint size,
if (!g_queue_is_empty (priv->queue)) { if (!g_queue_is_empty (priv->queue)) {
guint buf_size; guint buf_size;
*buf = g_queue_pop_head (priv->queue);
buf_size = gst_buffer_get_size (*buf);
GST_DEBUG_OBJECT (appsrc, "we have buffer %p of size %u", *buf, buf_size);
if (priv->new_caps) { if (priv->new_caps) {
gst_app_src_do_negotiate (bsrc); gst_app_src_do_negotiate (bsrc);
priv->new_caps = FALSE; priv->new_caps = FALSE;
} }
*buf = g_queue_pop_head (priv->queue);
buf_size = gst_buffer_get_size (*buf);
GST_DEBUG_OBJECT (appsrc, "we have buffer %p of size %u", *buf, buf_size);
priv->queued_bytes -= buf_size; priv->queued_bytes -= buf_size;
/* only update the offset when in random_access mode */ /* only update the offset when in random_access mode */