[FFmpeg-devel] [PATCH] Close vfwcap devices on exit()
Mon Apr 14 18:18:31 CEST 2008
With some devices and some versions of Windows, if you exit() an
application before you disconnect a VFW driver, that device will
remain unusable until you reboot. This happens in FFmpeg in some cases
like: ffmpeg -r 15 -f vfwcap -i 0 output.mpg
MPG doesn't accept 15 fps, so FFmpeg just exit()s.
Attached patch fixes this by adding a call to atexit() from within
read_header that calls a read_close() on all devices that were opened.
Since atexit() can't take any arguments, I added a static variable with
all the contexts that are opened (VFW supports only 10 devices).
Ok to apply?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ffmpeg-devel