ftell doesn't seem to work properly on Windows in text mode.
}
break;
case OPT_QPFILE:
- opt->qpfile = fopen( optarg, "r" );
+ opt->qpfile = fopen( optarg, "rb" );
if( !opt->qpfile )
{
fprintf( stderr, "x264 [error]: can't open `%s'\n", optarg );
fseek( opt->qpfile , file_pos , SEEK_SET );
break;
}
- if( num < i_frame )
+ if( num < i_frame && ret == 3 )
continue;
pic->i_qpplus1 = qp+1;
if ( type == 'I' ) pic->i_type = X264_TYPE_IDR;