]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavdevice/alsa-audio-common.c
frsh: Print error messages
[frescor/ffmpeg.git] / libavdevice / alsa-audio-common.c
index 1cb2640998d9408176aa13622abd0ac3cde9c664..f1d78b0cc519a8c11c864f6aa6372cf269a38515 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /**
- * @file alsa-audio-common.c
+ * @file libavdevice/alsa-audio-common.c
  * ALSA input and output: common code
  * @author Luca Abeni ( lucabe72 email it )
  * @author Benoit Fouet ( benoit fouet free fr )
@@ -43,9 +43,9 @@ static av_cold snd_pcm_format_t codec_id_to_pcm_format(int codec_id)
     }
 }
 
-av_cold int ff_alsa_open(AVFormatContext *ctx, int mode,
+av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
                          unsigned int *sample_rate,
-                         int channels, int *codec_id)
+                         int channels, enum CodecID *codec_id)
 {
     AlsaData *s = ctx->priv_data;
     const char *audio_device;
@@ -68,7 +68,7 @@ av_cold int ff_alsa_open(AVFormatContext *ctx, int mode,
     s->frame_size = av_get_bits_per_sample(*codec_id) / 8 * channels;
 
     if (ctx->flags & AVFMT_FLAG_NONBLOCK) {
-        flags = O_NONBLOCK;
+        flags = SND_PCM_NONBLOCK;
     }
     res = snd_pcm_open(&h, audio_device, mode, flags);
     if (res < 0) {