libavcodec: use avpriv_open()
[ffmpeg.git] / libavdevice / alsa-audio-enc.c
index f3782c5..bb4575f 100644 (file)
@@ -47,7 +47,7 @@ static av_cold int audio_write_header(AVFormatContext *s1)
     AlsaData *s = s1->priv_data;
     AVStream *st;
     unsigned int sample_rate;
-    enum CodecID codec_id;
+    enum AVCodecID codec_id;
     int res;
 
     st = s1->streams[0];
@@ -102,15 +102,13 @@ static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
 }
 
 AVOutputFormat ff_alsa_muxer = {
-    "alsa",
-    NULL_IF_CONFIG_SMALL("ALSA audio output"),
-    "",
-    "",
-    sizeof(AlsaData),
-    DEFAULT_CODEC_ID,
-    CODEC_ID_NONE,
-    audio_write_header,
-    audio_write_packet,
-    ff_alsa_close,
-    .flags = AVFMT_NOFILE,
+    .name           = "alsa",
+    .long_name      = NULL_IF_CONFIG_SMALL("ALSA audio output"),
+    .priv_data_size = sizeof(AlsaData),
+    .audio_codec    = DEFAULT_CODEC_ID,
+    .video_codec    = AV_CODEC_ID_NONE,
+    .write_header   = audio_write_header,
+    .write_packet   = audio_write_packet,
+    .write_trailer  = ff_alsa_close,
+    .flags          = AVFMT_NOFILE,
 };