GST_OBJECT_LOCK (typefind);
if (typefind->caps)
gst_caps_replace (&typefind->caps, NULL);
+ typefind->initial_offs = (guint64) - 1;
GST_OBJECT_UNLOCK (typefind);
typefind->mode = MODE_TYPEFIND;
buffer = gst_adapter_take_buffer (typefind->adapter, avail);
GST_BUFFER_PTS (buffer) = pts;
GST_BUFFER_DTS (buffer) = dts;
+ GST_BUFFER_OFFSET (buffer) = typefind->initial_offs;
GST_OBJECT_UNLOCK (typefind);
if (!push_cached_buffers) {
case MODE_TYPEFIND:
{
GST_OBJECT_LOCK (typefind);
+ if (typefind->initial_offs == GST_CLOCK_TIME_NONE)
+ typefind->initial_offs = GST_BUFFER_OFFSET (buffer);
gst_adapter_push (typefind->adapter, buffer);
GST_OBJECT_UNLOCK (typefind);