mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
baseparse: use correct offset when adding index entry
... bearing in mind that BUFFER_OFFSET is media specific and may not reflect the basic offset after having been parsed.
This commit is contained in:
parent
76b322a429
commit
a45019fdd6
1 changed files with 6 additions and 6 deletions
|
@ -1429,6 +1429,12 @@ gst_base_parse_handle_and_push_buffer (GstBaseParse * parse,
|
||||||
parse->priv->next_ts = GST_CLOCK_TIME_NONE;
|
parse->priv->next_ts = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parse->priv->upstream_seekable && parse->priv->exact_position &&
|
||||||
|
GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
|
||||||
|
gst_base_parse_add_index_entry (parse, offset,
|
||||||
|
GST_BUFFER_TIMESTAMP (buffer),
|
||||||
|
!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT), FALSE);
|
||||||
|
|
||||||
/* First buffers are dropped, this means that the subclass needs more
|
/* First buffers are dropped, this means that the subclass needs more
|
||||||
* frames to decide on the format and queues them internally */
|
* frames to decide on the format and queues them internally */
|
||||||
/* convert internal flow to OK and mark discont for the next buffer. */
|
/* convert internal flow to OK and mark discont for the next buffer. */
|
||||||
|
@ -1589,12 +1595,6 @@ gst_base_parse_push_buffer (GstBaseParse * parse, GstBuffer * buffer)
|
||||||
parse->priv->pending_events = NULL;
|
parse->priv->pending_events = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parse->priv->upstream_seekable && parse->priv->exact_position &&
|
|
||||||
GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
|
|
||||||
gst_base_parse_add_index_entry (parse, GST_BUFFER_OFFSET (buffer),
|
|
||||||
GST_BUFFER_TIMESTAMP (buffer),
|
|
||||||
!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT), FALSE);
|
|
||||||
|
|
||||||
if (klass->pre_push_buffer)
|
if (klass->pre_push_buffer)
|
||||||
ret = klass->pre_push_buffer (parse, buffer);
|
ret = klass->pre_push_buffer (parse, buffer);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue