mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
baseparse: Don't copy invalid DTS to the PTS
We were checking to make sure the buffer's DTS wouldn't be after its PTS. However, the check would also trigger when DTS is NONE, which is e.g. in the case of some broken cameras. Fixes #470
This commit is contained in:
parent
f590a861be
commit
1375c53f04
1 changed files with 2 additions and 1 deletions
|
@ -998,7 +998,8 @@ gst_base_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
|||
if (must_approximate_pts) {
|
||||
GST_BUFFER_PTS (buffer) = parse->priv->next_pts;
|
||||
if (!must_approximate_dts
|
||||
&& GST_BUFFER_DTS (buffer) > parse->priv->next_pts) {
|
||||
&& GST_BUFFER_DTS (buffer) > parse->priv->next_pts
|
||||
&& GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DTS (buffer))) {
|
||||
/* Can't present a frame before it's decoded: change the pts! This can
|
||||
* happen, for example, when accumulating rounding errors from the
|
||||
* buffer durations. Assume DTS is correct because only PTS is
|
||||
|
|
Loading…
Reference in a new issue