diff options
author | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-22 10:08:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2019-11-27 01:02:16 -0600 |
commit | edefa0cdd8d0a83aeb6b545b1914a7a2a0bcbd30 (patch) | |
tree | fee376d7d37d7cd886caac745fe9f4f602d0644b /libavdevice/alsa_dec.c | |
parent | 4c4d573f9986a92aea6fea9febf39665a69f51c1 (diff) | |
download | ffmpeg-streaming-edefa0cdd8d0a83aeb6b545b1914a7a2a0bcbd30.zip ffmpeg-streaming-edefa0cdd8d0a83aeb6b545b1914a7a2a0bcbd30.tar.gz |
Detect HR timestamp compatible version of ALSA before using HR timestamp functions
Diffstat (limited to 'libavdevice/alsa_dec.c')
-rw-r--r-- | libavdevice/alsa_dec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/alsa_dec.c b/libavdevice/alsa_dec.c index 902fba3..0b3b7e4 100644 --- a/libavdevice/alsa_dec.c +++ b/libavdevice/alsa_dec.c @@ -104,7 +104,9 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt) int res; int64_t dts; snd_pcm_sframes_t delay = 0; +#if HAVE_ALSA_HR_TS snd_pcm_audio_tstamp_config_t tstamp_config; +#endif if (av_new_packet(pkt, s->period_size * s->frame_size) < 0) { return AVERROR(EIO); @@ -127,6 +129,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt) } dts = 0; +#if HAVE_ALSA_HR_TS if (s->use_driver_timestamps) { tstamp_config.type_requested = 1; tstamp_config.report_delay = 1; @@ -142,6 +145,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt) delay = snd_pcm_status_get_delay(s->st); } } +#endif if (dts == 0) { // Driver timestamps not supported // Fall back to system timestamps |