mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 02:58:24 +00:00
baseparse: restrict duration scanning to pull mode and avoid extra set_caps call
This commit is contained in:
parent
9a76c1d8cd
commit
b45821c83f
2 changed files with 3 additions and 7 deletions
|
@ -1422,7 +1422,8 @@ gst_base_parse_handle_and_push_buffer (GstBaseParse * parse,
|
|||
/* check initial frame to determine if subclass/format can provide ts.
|
||||
* If so, that allows and enables extra seek and duration determining options */
|
||||
if (G_UNLIKELY (parse->priv->first_frame_offset < 0 && ret == GST_FLOW_OK)) {
|
||||
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) {
|
||||
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
|
||||
parse->priv->pad_mode == GST_ACTIVATE_PULL) {
|
||||
parse->priv->first_frame_offset = offset;
|
||||
parse->priv->first_frame_ts = GST_BUFFER_TIMESTAMP (buffer);
|
||||
GST_DEBUG_OBJECT (parse, "subclass provided ts %" GST_TIME_FORMAT
|
||||
|
@ -3497,7 +3498,7 @@ gst_base_parse_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
if (klass->set_sink_caps)
|
||||
res = klass->set_sink_caps (parse, caps);
|
||||
|
||||
return res && gst_pad_set_caps (pad, caps);
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -234,11 +234,6 @@ struct _GstBaseParseClass {
|
|||
GstFormat dest_format,
|
||||
gint64 * dest_value);
|
||||
|
||||
gboolean (*find_frame) (GstBaseParse *parse,
|
||||
GstFormat src_format,
|
||||
gint64 src_value,
|
||||
gint64 * dest_value);
|
||||
|
||||
gboolean (*event) (GstBaseParse *parse,
|
||||
GstEvent *event);
|
||||
|
||||
|
|
Loading…
Reference in a new issue