mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
alsasrc: Don't use driver timestamp if it's zero
Some alsa interfaces don't provide timestamps and thus always set the timestamp to zero. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/453
This commit is contained in:
parent
843cf07564
commit
ed33011502
1 changed files with 4 additions and 0 deletions
|
@ -947,6 +947,10 @@ gst_alsasrc_get_timestamp (GstAlsaSrc * asrc)
|
||||||
|
|
||||||
/* get high resolution time stamp from driver */
|
/* get high resolution time stamp from driver */
|
||||||
snd_pcm_status_get_htstamp (status, &tstamp);
|
snd_pcm_status_get_htstamp (status, &tstamp);
|
||||||
|
|
||||||
|
if (tstamp.tv_sec == 0 && tstamp.tv_nsec == 0)
|
||||||
|
return GST_CLOCK_TIME_NONE;
|
||||||
|
|
||||||
timestamp = GST_TIMESPEC_TO_TIME (tstamp);
|
timestamp = GST_TIMESPEC_TO_TIME (tstamp);
|
||||||
|
|
||||||
/* max available frames sets the depth of the buffer */
|
/* max available frames sets the depth of the buffer */
|
||||||
|
|
Loading…
Reference in a new issue