Commit 57b1ffa8 authored by Mart Raudsepp's avatar Mart Raudsepp

baseparse: Don't do buffer dropping in passthrough mode

Passthrough is supposed to pass buffers through, so don't clip them
then, especially as the subclass might not even have called
gst_base_parse_set_frame_rate in passthrough mode to set up the
lead_in_ts and lead_out_ts private member variables. This is common,
as it's usually done in their handle_frame implementation, which
doesn't even get called in passthrough push mode.
As an extra safety, also don't do the buffer dropping if
gst_base_parse_set_frame_rate hasn't been called with proper data,
which can be checked based on whether there's a valid frame_duration.
parent be56bd9a
Pipeline #48741 failed with stages
in 107 minutes and 39 seconds
......@@ -2543,10 +2543,12 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
parse->priv->seen_keyframe |= parse->priv->is_video &&
!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
if (frame->flags & GST_BASE_PARSE_FRAME_FLAG_CLIP) {
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
GST_CLOCK_TIME_IS_VALID (parse->segment.stop) &&
GST_BUFFER_TIMESTAMP (buffer) >
if (frame->flags & GST_BASE_PARSE_FRAME_FLAG_CLIP
&& (parse->priv->disable_passthrough || !parse->priv->passthrough)
&& GST_CLOCK_TIME_IS_VALID (parse->priv->frame_duration)) {
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)
&& GST_CLOCK_TIME_IS_VALID (parse->segment.stop)
&& GST_BUFFER_TIMESTAMP (buffer) >
parse->segment.stop + parse->priv->lead_out_ts) {
GST_LOG_OBJECT (parse, "Dropped frame, after segment");
ret = GST_FLOW_EOS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment