Avoid using deprecated AVFormatParameters::[audio|video]_codec_id field.
[ffmpeg.git] / libavdevice / alsa-audio-dec.c
index 48ed75ee1f8440a11fd4a96d99656194f903883e..833bca3b06ac6ba1c7567baa32ebff03908f5088 100644 (file)
  * plugin.
  */
 
-#include "libavformat/avformat.h"
 #include <alsa/asoundlib.h>
+#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);