Avoid using deprecated AVFormatParameters::[audio|video]_codec_id field.
[ffmpeg.git] / libavdevice / alsa-audio-dec.c
index 4dac3f9cb448c7d380ac07f6fccad0090d6407a5..833bca3b06ac6ba1c7567baa32ebff03908f5088 100644 (file)
@@ -79,7 +79,7 @@ static av_cold int audio_read_header(AVFormatContext *s1,
         return AVERROR(ENOMEM);
     }
     sample_rate = ap->sample_rate;
         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);
 
     ret = ff_alsa_open(s1, SND_PCM_STREAM_CAPTURE, &sample_rate, ap->channels,
         &codec_id);