Dear All,

I have a C file and I use fork under windows.
As you know, forks do not work under windows, but there is a way to
statically link Cygwin to MSVC++, so that you can use fork there (You can
think of everything be compiled under Cygwin)

I am also using ffmpeg, compiled in Windows under MinGW(As all of you know,
MinGW uses direct Windows API opposed to Cygwin's POSIX layer)

In my program, I fork twice. In the first child process, I write a video to
a pipe using ffmpeg API.
In the second child process (second fork()), I read from the same pipe, and
and save contents to a file.


As you know, usually, pipes work between child processes, as they have the
same copy of file descriptor table.
But in my case, it seems that in the reading child process, there is nothing
to read. i.e. it cannot find the pipe written to.

Does anybody has an explanation for this problem or a tip to solve it?

PS: As I told, the probable source of difficulty is here: I am creating
child processes under Cygwin while ffmpeg, is compiled under MinGW.
PS2: there is nothing wrong with my forking, I tried a simple test when I
wrote a string to a pipe in one child, and read from the same pipe in
another fork, it worked.
But in case of ffmpeg, it doesn't work.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to