[Ffmpeg-devel] Stream file handle hijacking by another thread

Stas Oskin stas.oskin
Mon Feb 26 00:28:54 CET 2007


Hi.

Sorry for the delay in reply, needed more time to analyze.

> Could you try running the attached program?  It might verify that the
> thread library is indeed broken.

Thanks, it works fine, and so the parts I re-wrote. After some digging
I found the 0 file descriptor effect happens because of the encoding
resuming mechanism I'm using (not clear why but I'll split it to a
separate thread).


I discovered how the encoding issues begin. After a hour or so of good
writing, the av_write_frame returns an error, and perror(errnum) gives
"bad file descriptor". After this any subsequent write attempts fail.
This happens only for some threads - others work fine.

This happens on 2 different machines (1 of them brand new), so the
possibility it's a bad disk is very low.

Has anyone encountered something similar on any configuration/OS?

Stas.




More information about the ffmpeg-devel mailing list