[FFmpeg-cvslog] r17863 - trunk/libavdevice/alsa-audio-common.c

Ivo ivop
Thu Nov 19 18:53:23 CET 2009


Hi,

On Thursday 19 November 2009, 08:20:07, Luca Abeni wrote:
> Ivo wrote:
> > On Saturday 07 March 2009, 19:17:13, lucabe wrote:
> >>      if (ctx->flags & AVFMT_FLAG_NONBLOCK) {
> >> -        flags = O_NONBLOCK;
> >> +        flags = SND_PCM_NONBLOCK;
> >>      }
> >>      res = snd_pcm_open(&h, audio_device, mode, flags);
> >
> > This broke alsa playback. Fix:
>
> [...]
>
> What's the particular problem? Has alsa some problems with
> non-blocking output, is libavformat broken in this regard,
> or is it an application issue?
>
> Maybe it is a problem with a particular driver? I am using
> alsa playback right now, and it seems to work correctly:
> ffmpeg -re -i file.mp3 -f alsa hw

I forgot the -re option. With that, it works correctly. Well, at least I got 
to use git-bisect for the first time :)

Nevertheless, my fix might be the correct behaviour anyway, because the 
documentation says:

#define AVFMT_FLAG_NONBLOCK     0x0004 ///< Do not block when reading 
packets from input.

So it's an input-only flag, not an output flag.

Regards,
--Ivo



More information about the ffmpeg-cvslog mailing list