[FFmpeg-devel] rtsp/rtp - blocking loop in udp_read_packet

elupus elupus
Wed Apr 23 11:41:55 CEST 2008


Anthony Champagne <anthony.champagne <at> haxe.fr> writes:


> What do you think of, could it be part of a patch ? or is there another way
> (except threadlock entire av_read_packet() call with a previously
> initialized global variable with format context) to achieve my needs ?
> 
> Anthony Champagne
> 

I posted a patch a while back that caused the read function to behave semi 
nonblocking and return EAGAIN if no data was available. You could potentially 
use that. 
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/57508/focus=57881

But as Luca pointed out. It's not entire complete as it could still stall 
during a read + it's not really the correct use for that flag as sockets are 
really not nonblocking.

A complete implementation of nonblocking reads or fixing up the abort function 
to give context would be accepted as a patch.

Regards
Joakim







More information about the ffmpeg-devel mailing list