]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/alsa-audio-common.c
Process picture aspect ratio changes in H.264.
[ffmpeg] / libavdevice / alsa-audio-common.c
index 9616d8aa4b75bd6882d66c563b03593fdaf06a71..e125b2d38646d1e4b617e8c7ff0e6491d78fdc23 100644 (file)
@@ -28,8 +28,8 @@
  * @author Nicolas George ( nicolas george normalesup org )
  */
 
-#include "libavformat/avformat.h"
 #include <alsa/asoundlib.h>
+#include "libavformat/avformat.h"
 
 #include "alsa-audio.h"
 
@@ -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) {