Commit 7c013538 authored by Loren Merritt's avatar Loren Merritt

10l in r473 and stdin



git-svn-id: svn://svn.videolan.org/x264/trunk@477 df754926-b1dd-0310-bc7b-ec298dee348c
parent 3b66f690
......@@ -54,11 +54,16 @@ int open_file_yuv( char *psz_filename, hnd_t *p_handle, x264_param_t *p_param )
yuv_input_t *h = malloc(sizeof(yuv_input_t));
h->width = p_param->i_width;
h->height = p_param->i_height;
h->fh = fopen(psz_filename, "rb");
h->next_frame = 0;
*p_handle = (hnd_t)h;
if( !strcmp(psz_filename, "-") )
h->fh = stdin;
else
h->fh = fopen(psz_filename, "rb");
if( h->fh == NULL )
return -1;
*p_handle = (hnd_t)h;
return 0;
}
......@@ -279,7 +284,7 @@ int read_frame_thread( x264_picture_t *p_pic, hnd_t handle, int i_frame )
ret |= h->p_read_frame( p_pic, h->p_handle, i_frame );
}
if( i_frame+1 < h->frame_total )
if( !h->frame_total || i_frame+1 < h->frame_total )
{
h->next_frame =
h->next_args->i_frame = i_frame+1;
......
......@@ -956,12 +956,6 @@ static int Parse( int argc, char **argv,
}
/* open the input */
if( !strcmp( psz_filename, "-" ) )
{
opt->hin = stdin;
optind++;
}
else
{
if( b_avis )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment