[FFmpeg-devel] What is missing for working AVFMT_FLAG_NONBLOCK?

aviad rozenhek aviadr1
Sun Jan 17 14:45:32 CET 2010


On Tue, Mar 3, 2009 at 04:06, Michael Niedermayer <michaelni at gmx.at> wrote:

> Hi
>
> AVFMT_FLAG_NONBLOCK is not enabled in ffmpeg/ffplay.c
> what is missing for it?
> capturing from several devices is likely going to work better if they
> dont block. And yes i know it all should be using select() but that is
> harder. And simple polling with non blocking demuxers should already
> work pretty well.
>
> is the only thing missing the code in ffmpeg.c that picks files
> based on the next expected timestamp?
>
> id like to set AVFMT_FLAG_NONBLOCK by default in ffmpeg.c
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
>
Hi,

what about udp.c and tcp.c? these could benefit from working in a
non-blocking way too.
attached patch that makes udp.c work in a non-blocking way.
this fixes an annoyance that would make ffplay hang forever until killed:

running:
  $> ffplay udp://localhost?localport=1234,
without running any encoder that writes to udp://localhost:1234, the ffplay
would hang until doing a hard kill, because it would be stuck in a loop
inside udp.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: non_blocking_udp.patch
Type: application/octet-stream
Size: 1450 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100117/ff819a05/attachment.obj>



More information about the ffmpeg-devel mailing list