Check for EOF before complaining about the lack of PPM in the pipe in the ffmpeg...
authorpabs3 <pabs3@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 5 Nov 2008 09:39:07 +0000 (09:39 +0000)
committerpabs3 <pabs3@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 5 Nov 2008 09:39:07 +0000 (09:39 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2154 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp

index 951bfbd..b611d97 100644 (file)
@@ -178,6 +178,10 @@ ffmpeg_mptr::grab_frame(void)
        float divisor;
        char cookie[2];
        cookie[0]=fgetc(file);
+
+       if(feof(file))
+               return false;
+
        cookie[1]=fgetc(file);
 
        if(cookie[0]!='P' || cookie[1]!='6')