From b4be9fecbbe66767fcf3b25aec8628d3f6b789ec Mon Sep 17 00:00:00 2001 From: eddyg Date: Tue, 21 Aug 2007 03:24:39 +0000 Subject: Add Subtitle scanning for forced subtitles and normal subtitles from the CLI and the MacOS GUI. See the new subtitle language options in the GUI. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@844 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/dvd.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'libhb/dvd.c') diff --git a/libhb/dvd.c b/libhb/dvd.c index 870664f2c..c231b378c 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -654,9 +654,23 @@ int hb_dvd_read( hb_dvd_t * d, hb_buffer_t * b ) for( ;; ) { - int block, pack_len, next_vobu; + int block, pack_len, next_vobu, read_retry; - if( DVDReadBlocks( d->file, d->next_vobu, 1, b->data ) != 1 ) + for( read_retry = 0; read_retry < 3; read_retry++ ) + { + if( DVDReadBlocks( d->file, d->next_vobu, 1, b->data ) == 1 ) + { + /* + * Successful read. + */ + break; + } else { + hb_log( "dvd: Read Error on blk %d, attempt %d", + d->next_vobu, read_retry ); + } + } + + if( read_retry == 3 ) { hb_log( "dvd: Unrecoverable Read Error from DVD, potential HD or DVD Failure (blk: %d)", d->next_vobu ); return 0; -- cgit v1.2.3