mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
amcvideodec/enc: Correctly check for no PTS on input buffers
MediaCodec gives us a presentation timestamp of 0 if it does not know anything, but GStreamer gives us GST_CLOCK_TIME_NONE. Don't mix up these two. https://bugzilla.gnome.org/show_bug.cgi?id=780190
This commit is contained in:
parent
acfaf3a001
commit
febbaaddcf
2 changed files with 4 additions and 2 deletions
|
@ -682,7 +682,8 @@ _find_nearest_frame (GstAmcVideoDec * self, GstClockTime reference_timestamp)
|
|||
best_id = id;
|
||||
|
||||
/* For frames without timestamp we simply take the first frame */
|
||||
if ((reference_timestamp == 0 && timestamp == 0) || diff == 0)
|
||||
if ((reference_timestamp == 0 && !GST_CLOCK_TIME_IS_VALID (timestamp))
|
||||
|| diff == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -730,7 +730,8 @@ _find_nearest_frame (GstAmcVideoEnc * self, GstClockTime reference_timestamp)
|
|||
best_id = id;
|
||||
|
||||
/* For frames without timestamp we simply take the first frame */
|
||||
if ((reference_timestamp == 0 && timestamp == 0) || diff == 0)
|
||||
if ((reference_timestamp == 0 && !GST_CLOCK_TIME_IS_VALID (timestamp))
|
||||
|| diff == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue