From: Loren Merritt Date: Mon, 20 Mar 2006 23:32:43 +0000 (+0000) Subject: 10l in r473 and stdin X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c013538206535c3abd70eb56a00bed0dccb43c5;p=libx264 10l in r473 and stdin git-svn-id: svn://svn.videolan.org/x264/trunk@477 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/muxers.c b/muxers.c index 5bfb9245..5fab68d8 100644 --- a/muxers.c +++ b/muxers.c @@ -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; diff --git a/x264.c b/x264.c index eb277697..2ffcdfcb 100644 --- a/x264.c +++ b/x264.c @@ -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 ) {