From 516553c65ad905dad51054dffb76fee8f217a1c9 Mon Sep 17 00:00:00 2001 From: eddyg Date: Wed, 19 Sep 2007 04:17:01 +0000 Subject: [PATCH] Don't discard titles during scan just because of a read failure on one or more of the previews. The missing previews are handles OK when you try to view them in the preview window. git-svn-id: svn://localhost/HandBrake/trunk@973 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/scan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libhb/scan.c b/libhb/scan.c index 31eb703e..a23ae390 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -300,7 +300,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title ) if (data->dvd) hb_dvd_start( data->dvd, title->index, 1 ); - + for( i = 0; i < 10; i++ ) { int j, k; @@ -334,14 +334,16 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title ) { if( !hb_dvd_read( data->dvd, buf_ps ) ) { - goto error; + hb_log("Could not read preview %d, skipped", i); + goto skip_preview; } } else if (data->stream) { if ( !hb_stream_read(data->stream,buf_ps) ) { - goto error; + hb_log("Could not read preview %d, skipped", i); + goto skip_preview; } } hb_demux_ps( buf_ps, list_es ); @@ -497,6 +499,7 @@ static int DecodePreviews( hb_scan_t * data, hb_title_t * title ) } } +skip_preview: while( ( buf_raw = hb_list_item( list_raw, 0 ) ) ) { hb_list_rem( list_raw, buf_raw ); -- 2.11.0