#endif
#ifdef WIN32
+#define POPEN_BINARY_READ_TYPE "rb"
#define POPEN_BINARY_WRITE_TYPE "wb"
#else
+#define POPEN_BINARY_READ_TYPE "r"
#define POPEN_BINARY_WRITE_TYPE "w"
#endif
command=strprintf("ffmpeg -i \"%s\" -an -f image2pipe -vcodec ppm -\n",filename.c_str());
- file=popen(command.c_str(),"rb");
+ file=popen(command.c_str(),POPEN_BINARY_READ_TYPE);
if(!file)
{
command=strprintf("convert \"%s\" -flatten ppm:-\n",filename.c_str());
- file=popen(command.c_str(),"rb");
+ file=popen(command.c_str(),POPEN_BINARY_READ_TYPE);
if(!file)
{