]> granicus.if.org Git - handbrake/commitdiff
fix dvdnav read error retry
authorjstebbins <jstebbins.hb@gmail.com>
Thu, 10 Dec 2009 00:17:46 +0000 (00:17 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Thu, 10 Dec 2009 00:17:46 +0000 (00:17 +0000)
the error count was being reset on dvdnav events that didn't involve
any actual reading.  So we got caught in an very long loop alternating
between read failures and valid events.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3022 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/dvdnav.c

index 84895caca6ebd0e548f8598099d67a2855916976..59e1ac67ef940a9dc7138310a0dcd5a67d774c37 100644 (file)
@@ -1003,7 +1003,6 @@ static int hb_dvdnav_read( hb_dvd_t * e, hb_buffer_t * b )
             }
             continue;
         }
-        error_count = 0;
         switch ( event )
         {
         case DVDNAV_BLOCK_OK:
@@ -1015,6 +1014,7 @@ static int hb_dvdnav_read( hb_dvd_t * e, hb_buffer_t * b )
             if (chapter > 1)
                 b->new_chap = chapter;
             chapter = 0;
+            error_count = 0;
             return 1;
 
         case DVDNAV_NOP: