[x264-devel] commit: Fix lavf input with pipes and image sequences (David Conrad )

git version control git at videolan.org
Sat Jan 30 13:58:00 CET 2010


x264 | branch: master | David Conrad <lessen42 at gmail.com> | Sat Jan 23 18:05:25 2010 -0800| [00f933f05df722e4b133d2c57f1f45dba285430c] | committer: Jason Garrett-Glaser 

Fix lavf input with pipes and image sequences
x264 should now be able to encode from an image sequence using an image2-style formatted string (e.g. file%02d.jpg).

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=00f933f05df722e4b133d2c57f1f45dba285430c
---

 x264.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/x264.c b/x264.c
index 3a07bb3..db33536 100644
--- a/x264.c
+++ b/x264.c
@@ -719,13 +719,11 @@ static int select_input( const char *demuxer, char *used_demuxer, char *filename
     if( b_regular )
     {
         FILE *f = fopen( filename, "r" );
-        if( !f )
+        if( f )
         {
-            fprintf( stderr, "x264 [error]: could not open input file `%s'\n", filename );
-            return -1;
+            b_regular = x264_is_regular_file( f );
+            fclose( f );
         }
-        b_regular = x264_is_regular_file( f );
-        fclose( f );
     }
     const char *module = b_auto ? ext : demuxer;
 
@@ -756,7 +754,7 @@ static int select_input( const char *demuxer, char *used_demuxer, char *filename
 #endif
 #ifdef LAVF_INPUT
         if( (b_auto || !strcasecmp( demuxer, "lavf" )) &&
-            (!b_regular || !lavf_input.open_file( filename, p_handle, info, opt )) )
+            !lavf_input.open_file( filename, p_handle, info, opt ) )
         {
             module = "lavf";
             b_auto = 0;



More information about the x264-devel mailing list