playbin2: Reset buffer counter in playbin2-compressed tests every time when going to READY

This commit is contained in:
Sebastian Dröge 2011-03-29 19:15:27 +02:00
parent 2f8467d682
commit 0e9203df11

View file

@ -212,6 +212,17 @@ gst_codec_sink_base_init (gpointer klass)
{
}
static gboolean
gst_codec_sink_start (GstBaseSink * bsink)
{
GstCodecSink *sink = (GstCodecSink *) bsink;
sink->n_raw = 0;
sink->n_compressed = 0;
return TRUE;
}
static GstFlowReturn
gst_codec_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
{
@ -230,6 +241,7 @@ gst_codec_sink_class_init (GstCodecSinkClass * klass)
{
GstBaseSinkClass *basesink_class = (GstBaseSinkClass *) klass;
basesink_class->start = gst_codec_sink_start;
basesink_class->render = gst_codec_sink_render;
}