diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-03-02 11:54:45 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-03-05 16:57:28 +0100 |
commit | 456d65a5c6a9013adabbe0f21c920a6f04b9e6e9 (patch) | |
tree | 677d7bc9a5c9eb6229fa9d4f4fd86e85d9bf3834 /libavdevice/alsa-audio-dec.c | |
parent | 9bbe6ed1e0b80249124b8c040544cc30e753bb76 (diff) | |
download | ffmpeg-456d65a5c6a9013adabbe0f21c920a6f04b9e6e9.tar.gz |
alsa: fix timefilter usage.
The period argument is supposed to be the number of samples since
the last update.
Diffstat (limited to 'libavdevice/alsa-audio-dec.c')
-rw-r--r-- | libavdevice/alsa-audio-dec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c index 62bf42d272..e0e0954430 100644 --- a/libavdevice/alsa-audio-dec.c +++ b/libavdevice/alsa-audio-dec.c @@ -123,7 +123,8 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt) dts = av_gettime(); snd_pcm_delay(s->h, &delay); dts -= av_rescale(delay + res, 1000000, s->sample_rate); - pkt->pts = ff_timefilter_update(s->timefilter, dts, res); + pkt->pts = ff_timefilter_update(s->timefilter, dts, s->last_period); + s->last_period = res; pkt->size = res * s->frame_size; |