summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
authoreddyg <[email protected]>2007-09-19 04:17:01 +0000
committereddyg <[email protected]>2007-09-19 04:17:01 +0000
commit42519c3e85dacfe64ed776092f019ee2155954fb (patch)
tree064ac671266302b86ca83abc823481ff359ed4a7 /libhb/scan.c
parent9b1a00e83f2d90913fc6470df98e1849f883c0cf (diff)
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://svn.handbrake.fr/HandBrake/trunk@973 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/scan.c')
-rw-r--r--libhb/scan.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index 31eb703e2..a23ae390e 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 );