From: David Conrad Date: Sun, 24 Jan 2010 02:05:25 +0000 (-0800) Subject: Fix lavf input with pipes and image sequences X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91c0fd9499a7132ac599080faf55daa3b4c5c89a;p=libx264 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). --- diff --git a/x264.c b/x264.c index 3a07bb3c..db335368 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;