summaryrefslogtreecommitdiffstats
path: root/libhb/dvd.c
diff options
context:
space:
mode:
authoreddyg <[email protected]>2007-08-21 03:24:39 +0000
committereddyg <[email protected]>2007-08-21 03:24:39 +0000
commitb4be9fecbbe66767fcf3b25aec8628d3f6b789ec (patch)
treeb14084f5f504abc08826d2cd7662f21c7b0e5982 /libhb/dvd.c
parenta035bfd29afeb4560d85a295a405a83b76e68784 (diff)
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
Diffstat (limited to 'libhb/dvd.c')
-rw-r--r--libhb/dvd.c18
1 files changed, 16 insertions, 2 deletions
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;