summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-11-19 00:51:44 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-11-19 00:51:44 -0300
commit83ea7f3ea5ea84678ddb7561b17a8b663c543403 (patch)
treebe4258cc51246cdda4f95a8536ca896b3fa2787c
parentb4a05af66feb72254328cb104107c69f1945590b (diff)
downloadgstreamer-83ea7f3ea5ea84678ddb7561b17a8b663c543403.tar.gz
Revert "baseparse: do not overwrite header buffer timestamps"
This reverts commit 2c475a035543efc0202ecdc52070295a421ed4b4. This causes issues with h264parse. It breaks timestamps as there are headers in the middle of the stream and this patch makes the timestamps for those differ from the ones that are adjusted, creating a discontinuity and leading to sync issues.
-rw-r--r--libs/gst/base/gstbaseparse.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index f8f4380010..c9a57c5737 100644
--- a/libs/gst/base/gstbaseparse.c
+++ b/libs/gst/base/gstbaseparse.c
@@ -980,17 +980,16 @@ static GstFlowReturn
gst_base_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
{
GstBuffer *buffer = frame->buffer;
- gboolean is_header = GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_HEADER);
- if (!GST_BUFFER_PTS_IS_VALID (buffer) && !is_header &&
+ if (!GST_BUFFER_PTS_IS_VALID (buffer) &&
GST_CLOCK_TIME_IS_VALID (parse->priv->next_pts)) {
GST_BUFFER_PTS (buffer) = parse->priv->next_pts;
}
- if (!GST_BUFFER_DTS_IS_VALID (buffer) && !is_header &&
+ if (!GST_BUFFER_DTS_IS_VALID (buffer) &&
GST_CLOCK_TIME_IS_VALID (parse->priv->next_dts)) {
GST_BUFFER_DTS (buffer) = parse->priv->next_dts;
}
- if (!GST_BUFFER_DURATION_IS_VALID (buffer) && !is_header &&
+ if (!GST_BUFFER_DURATION_IS_VALID (buffer) &&
GST_CLOCK_TIME_IS_VALID (parse->priv->frame_duration)) {
GST_BUFFER_DURATION (buffer) = parse->priv->frame_duration;
}
@@ -2879,14 +2878,11 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
gint skip = -1;
guint min_size, av;
GstClockTime pts, dts;
- gboolean is_header;
parse = GST_BASE_PARSE (parent);
bclass = GST_BASE_PARSE_GET_CLASS (parse);
GST_DEBUG_OBJECT (parent, "chain");
- is_header = buffer && GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_HEADER);
-
/* early out for speed, if we need to skip */
if (buffer && GST_BUFFER_IS_DISCONT (buffer))
parse->priv->skip = 0;
@@ -3082,7 +3078,7 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
/* already inform subclass what timestamps we have planned,
* at least if provided by time-based upstream */
- if (parse->priv->upstream_format == GST_FORMAT_TIME && !is_header) {
+ if (parse->priv->upstream_format == GST_FORMAT_TIME) {
tmpbuf = gst_buffer_make_writable (tmpbuf);
GST_BUFFER_PTS (tmpbuf) = parse->priv->next_pts;
GST_BUFFER_DTS (tmpbuf) = parse->priv->next_dts;