Commit ed330115 authored by Georg Lippitsch's avatar Georg Lippitsch Committed by Sebastian Dröge

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 #453
parent 843cf075
......@@ -947,6 +947,10 @@ gst_alsasrc_get_timestamp (GstAlsaSrc * asrc)
/* get high resolution time stamp from driver */
snd_pcm_status_get_htstamp (status, &tstamp);
if (tstamp.tv_sec == 0 && tstamp.tv_nsec == 0)
timestamp = GST_TIMESPEC_TO_TIME (tstamp);
/* max available frames sets the depth of the buffer */
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