baseparse: Don't set meaningless buffer dts from segment->start

When we do not have any information about DTSs we shouldn't try to make
them up, moreover after seeking `segment->start` has nothing to do with
the next buffer timing (and is probably after the actual buffer timestamp)
and since, since fa8312472f
we do:

```
if (buffer->dts > buffer->dts)
    buffer->pts = buffer->dts
```

we end up setting `buffer->pts = segment->start` which is plain
broken and leads to downstream decoder accept the first buffer
as it will be inside the segment (its pts==segment->start) which
basically means accurate seeking behaves mostly the same way as
keyframe seeks.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/492
This commit is contained in:
Thibault Saunier 2020-01-07 17:12:54 -03:00 committed by Thibault Saunier
parent b4ba9ec089
commit baa5aae24b

View file

@ -1330,7 +1330,7 @@ gst_base_parse_sink_event_default (GstBaseParse * parse, GstEvent * event)
/* not considered BYTE seekable if it is talking to us in TIME,
* whatever else it might claim */
parse->priv->upstream_seekable = FALSE;
next_dts = in_segment->start;
next_dts = GST_CLOCK_TIME_NONE;
gst_event_copy_segment (event, &out_segment);
}