/* Autocrop by default. Gnark gnark */
memcpy( job->crop, title->crop, 4 * sizeof( int ) );
+ if( title->aspect == 16 )
+ {
+ hb_reduce( &job->pixel_aspect_width, &job->pixel_aspect_height,
+ 16 * title->height, 9 * title->width );
+ }
+ else
+ {
+ hb_reduce( &job->pixel_aspect_width, &job->pixel_aspect_height,
+ 4 * title->height, 3 * title->width );
+ }
+
job->width = title->width - job->crop[2] - job->crop[3];
+// job->height = title->height - job->crop[0] - job->crop[1];
hb_fix_aspect( job, HB_KEEP_WIDTH );
if( job->height > title->height - job->crop[0] - job->crop[1] )
{
job->height = title->height - job->crop[0] - job->crop[1];
hb_fix_aspect( job, HB_KEEP_HEIGHT );
}
+
+ hb_log( "scan: title (%d) job->width:%d, job->height:%d",
+ i,job->width, job->height );
+
job->keep_ratio = 1;
job->vcodec = HB_VCODEC_FFMPEG;
FILE * file_preview;
char filename[1024];
- hb_dvd_seek( data->dvd, (float) ( i + 1 ) / 11.0 );
+ if( !hb_dvd_seek( data->dvd, (float) ( i + 1 ) / 11.0 ) )
+ {
+ goto error;
+ }
hb_log( "scan: preview %d", i + 1 );
mpeg2 = hb_libmpeg2_init();
- for( j = 0; j < 10240; j++ )
+ for( j = 0; j < 10240 ; j++ )
{
if( !hb_dvd_read( data->dvd, buf_ps ) )
{
audio->channels = 5;
break;
}
+
+ if (flags & A52_LFE) {
+ audio->lfechannels = 1;
+ } else {
+ audio->lfechannels = 0;
+ }
+
+ /* store the AC3 tags for future reference
+ This enables us to find out if we had a stereo or Dolby source later on */
+ audio->config.a52.ac3flags = flags;
+
/* XXX */
sprintf( audio->lang + strlen( audio->lang ),
- " (%d ch)", audio->channels );
+ " (%d.%d ch)", audio->channels, audio->lfechannels );
break;
}
}