From: Sebastian Dröge Date: Thu, 3 Apr 2014 18:31:16 +0000 (+0200) Subject: baseparse: Make sure to set the DISCONT flag on the first buffer of each GOP in rever... X-Git-Tag: 1.3.1~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37670af79cc983f081c48a1336e02b7fd2d8ef99;p=platform%2Fupstream%2Fgstreamer.git baseparse: Make sure to set the DISCONT flag on the first buffer of each GOP in reverse playback mode --- diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index bc5a513..93d1ed2 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -2501,6 +2501,7 @@ gst_base_parse_send_buffers (GstBaseParse * parse) GSList *send = NULL; GstBuffer *buf; GstFlowReturn ret = GST_FLOW_OK; + gboolean first = TRUE; send = parse->priv->buffers_send; @@ -2514,6 +2515,13 @@ gst_base_parse_send_buffers (GstBaseParse * parse) 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);