Fix the ffmpeg/dv/imagemagick targets/importers on Windows. Thanks to PXEGeek for...
authorpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 17 Oct 2007 05:47:23 +0000 (05:47 +0000)
committerpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 17 Oct 2007 05:47:23 +0000 (05:47 +0000)
git-svn-id: http://svn.voria.com/code@934 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/modules/mod_dv/trgt_dv.cpp
synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp
synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp
synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp
synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.cpp

index 8fcaabe..720736c 100644 (file)
@@ -128,7 +128,7 @@ dv_trgt::init()
                command=strprintf("encodedv - > \"%s\"\n",filename.c_str());
 
        // Open the pipe to encodedv
-       file=popen(command.c_str(),"w");
+       file=popen(command.c_str(),"wb");
 
        if(!file)
        {
index 116c6da..cd38376 100644 (file)
@@ -70,7 +70,7 @@ ffmpeg_mptr::seek_to(int frame)
 
                command=strprintf("ffmpeg -i \"%s\" -an -f image2pipe -vcodec ppm -\n",filename.c_str());
 
-               file=popen(command.c_str(),"r");
+               file=popen(command.c_str(),"rb");
 
                if(!file)
                {
index cf82354..5585878 100644 (file)
@@ -128,7 +128,7 @@ ffmpeg_trgt::init()
 
        command=strprintf("ffmpeg -f image2pipe -vcodec ppm -an -r %f -i pipe: -loop -hq -title \"%s\" -vcodec mpeg1video -y \"%s\"\n",desc.get_frame_rate(),get_canvas()->get_name().c_str(),filename.c_str());
 
-       file=popen(command.c_str(),"w");
+       file=popen(command.c_str(),"wb");
 
        // etl::yield();
 
index 390f611..4d8a08c 100644 (file)
@@ -173,7 +173,7 @@ imagemagick_mptr::get_frame(synfig::Surface &surface,Time /*time*/, synfig::Prog
 
        command=strprintf("convert \"%s\" -flatten ppm:-\n",filename.c_str());
 
-       file=popen(command.c_str(),"r");
+       file=popen(command.c_str(),"rb");
 
        if(!file)
        {
index 123640b..7478001 100644 (file)
@@ -125,7 +125,7 @@ imagemagick_trgt::start_frame(synfig::ProgressCallback *cb)
        else
                command=strprintf("convert -depth 8 -size %dx%d rgb:-[0] -density %dx%d \"%s\"\n",desc.get_w(),desc.get_h(),round_to_int(desc.get_x_res()/39.3700787402),round_to_int(desc.get_y_res()/39.3700787402),filename.c_str());
 
-       file=popen(command.c_str(),"w");
+       file=popen(command.c_str(),"wb");
 
        if(!file)
        {