Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2011-07-01 17:26:40 +0400
committerNicolas George <nicolas.george@normalesup.org>2011-07-02 12:43:38 +0400
commit5d35b279e21814b3b1499ae0b2e0e0dad7d7f782 (patch)
tree1a4a710cd1c0221436692f4a2879cac4e019a0fc /libavdevice/alsa-audio-common.c
parent3074f03a074de3aab79639d261cbd0ccc265b5b4 (diff)
ALSA demuxer: use av_gettime and a timefilter.
The PTS for captured audio was measured using snd_pcm_htimestamp. snd_pcm_htimestamp hangs when the input is a dsnoop plugin. Furthermore, at some point, snd_pcm_htimestamp started returning monotonic timestamps rather than wall clock timestamps, in most but not all situations. Monotonic timestamps are fine, but ffmpeg uses wall clock timestamps everywhere else, and we have no API to inform the user which kind of timestamps it is. A separate snd_pcm_htimestamp is only slightly less accurate than snd_pcm_htimestamp: the standard deviation for the difference between two consecutive timestamps is (on my hardware): - ~13 µs with snd_pcm_htimestamp; - ~35 µs with av_gettime; - ~5 µs with av_gettime and a timefilter.
Diffstat (limited to 'libavdevice/alsa-audio-common.c')
-rw-r--r--libavdevice/alsa-audio-common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c
index 8c5be3c864..6188721f48 100644
--- a/libavdevice/alsa-audio-common.c
+++ b/libavdevice/alsa-audio-common.c
@@ -316,6 +316,7 @@ av_cold int ff_alsa_close(AVFormatContext *s1)
AlsaData *s = s1->priv_data;
av_freep(&s->reorder_buf);
+ ff_timefilter_destroy(s->timefilter);
snd_pcm_close(s->h);
return 0;
}