[gst-devel] Losing prerolled buffers

Michael Smith msmith at fluendo.com
Tue May 23 02:13:04 CEST 2006


On Mon, 2006-05-22 at 23:48 +0100, Iain * wrote:
> Hi, 2 questions for everyone :)
> 
> Firstly with my custom sink[1] (derived from GstBaseSink) I get the
> following warning.
> 
> Message: Internal data flow problem.
> Debug: gstbasesink.c(1878): gst_base_sink_chain_unlocked ():
> /marlinloadpipeline0/load-sink-0:
> Received buffer without a new-segment. Assuming timestamps start from 0.
> 
> what element should be responsible for creating/sending the
> new-segment? The element the sink is linked to (my
> channel-splitter[2]) is just passing any events it receives onwards.
> 
> 	if (GST_IS_EVENT (buffer)) {
> 		for (p = splitter->srcpads; p; p = p->next) {
> 			gst_pad_event_default (GST_PAD (p->data),
> 					       GST_EVENT (buffer));
> 		}
> 		g_object_unref (splitter);
> 		return GST_FLOW_OK;
> 	}

As Tim noted, this is wrong, you want this in an event-handling
function, not in your chain function. However, once you've moved it
there, you ALSO need to ref the event before forwarding it to each pad,
something like (pseudocode follows);
 foreach pad:
   ref(event)
   forward(event)
 unref(event)

Mike






More information about the gstreamer-devel mailing list