X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_ffmpeg%2Fmptr_ffmpeg.cpp;h=f1f7e0be458598b6fc9856b769a34f487ec6059d;hb=792ed706efeef84c5b82abf982078daad15f5d6c;hp=bc4cc7b0b1db4257380e34fb478c44c8f97c64ea;hpb=9698bd80061a79c7f9e6940d2cfba7d34cd4c120;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp b/synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp index bc4cc7b..f1f7e0b 100644 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp +++ b/synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp @@ -34,6 +34,9 @@ #include #include "mptr_ffmpeg.h" #include +#include +#include +#include #include #include #include @@ -63,14 +66,47 @@ ffmpeg_mptr::seek_to(int frame) { if(file) { - pclose(file); + fclose(file); + int status; + waitpid(pid,&status,0); } - string command; - - command=strprintf("ffmpeg -i \"%s\" -an -f image2pipe -vcodec ppm -\n",filename.c_str()); - - file=popen(command.c_str(),POPEN_BINARY_READ_TYPE); + int p[2]; + + if (pipe(p)) { + cerr<<"Unable to open pipe to ffmpeg"<