GSList *send = NULL;
GstBuffer *buf;
GstFlowReturn ret = GST_FLOW_OK;
+ gboolean first = TRUE;
send = parse->priv->buffers_send;
GST_TIME_ARGS (GST_BUFFER_PTS (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf));
+ /* Make sure the first buffer is always DISCONT. If we split
+ * GOPs inside the parser this is otherwise not guaranteed */
+ if (first) {
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
+ first = FALSE;
+ }
+
/* iterate output queue an push downstream */
ret = gst_pad_push (parse->srcpad, buf);
send = g_slist_delete_link (send, send);