X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Falsa-audio-dec.c;h=f1dd29bafc90cd4c1a83907f240b151cc4fa228b;hb=961e4a3389e348033312662c0581a0fb34eaa14b;hp=48ed75ee1f8440a11fd4a96d99656194f903883e;hpb=5c463aacb26b119ae342de37b411b140718274e0;p=ffmpeg diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c index 48ed75ee1f8..f1dd29bafc9 100644 --- a/libavdevice/alsa-audio-dec.c +++ b/libavdevice/alsa-audio-dec.c @@ -21,7 +21,7 @@ */ /** - * @file libavdevice/alsa-audio-dec.c + * @file * ALSA input and output: input * @author Luca Abeni ( lucabe72 email it ) * @author Benoit Fouet ( benoit fouet free fr ) @@ -45,12 +45,12 @@ * plugin. */ -#include "libavformat/avformat.h" #include +#include "libavformat/avformat.h" #include "alsa-audio.h" -av_cold static int audio_read_header(AVFormatContext *s1, +static av_cold int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap) { AlsaData *s = s1->priv_data; @@ -79,7 +79,7 @@ av_cold static int audio_read_header(AVFormatContext *s1, return AVERROR(ENOMEM); } sample_rate = ap->sample_rate; - codec_id = ap->audio_codec_id; + codec_id = s1->audio_codec_id; ret = ff_alsa_open(s1, SND_PCM_STREAM_CAPTURE, &sample_rate, ap->channels, &codec_id); @@ -111,7 +111,7 @@ av_cold static int audio_read_header(AVFormatContext *s1, } /* take real parameters */ - st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = codec_id; st->codec->sample_rate = sample_rate; st->codec->channels = ap->channels;