diff options
Diffstat (limited to 'libavdevice/alsa-audio-dec.c')
-rw-r--r-- | libavdevice/alsa-audio-dec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c index 937f6a6ef7..e3ad98b7f3 100644 --- a/libavdevice/alsa-audio-dec.c +++ b/libavdevice/alsa-audio-dec.c @@ -3,20 +3,20 @@ * Copyright (c) 2007 Luca Abeni ( lucabe72 email it ) * Copyright (c) 2007 Benoit Fouet ( benoit fouet free fr ) * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -46,9 +46,9 @@ */ #include <alsa/asoundlib.h> -#include "libavformat/avformat.h" #include "libavutil/opt.h" +#include "avdevice.h" #include "alsa-audio.h" static av_cold int audio_read_header(AVFormatContext *s1, @@ -127,11 +127,11 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt) snd_htimestamp_t timestamp; snd_pcm_uframes_t ts_delay; - if (av_new_packet(pkt, s->period_size) < 0) { + if (av_new_packet(pkt, s->period_size * s->frame_size) < 0) { return AVERROR(EIO); } - while ((res = snd_pcm_readi(s->h, pkt->data, pkt->size / s->frame_size)) < 0) { + while ((res = snd_pcm_readi(s->h, pkt->data, s->period_size)) < 0) { if (res == -EAGAIN) { av_free_packet(pkt); |