[MPlayer-users] chapter list bug

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat May 26 22:39:13 CEST 2007


Jared Breland wrote:
> On 05/26/07 14:59, Nico Sabbi wrote:
> 
>>wrong patch; I'll fix it differently. Please, don't top post
> 
> 
> Could you please explain how it was wrong?  Would like to know for future
> reference.

Index: stream_dvd.c
===================================================================
--- stream_dvd.c        (revisione 23385)
+++ stream_dvd.c        (copia locale)
@@ -614,12 +614,12 @@
         return;

      mp_msg(MSGT_IDENTIFY, MSGL_INFO, "CHAPTERS: ");
-    for(i=0; i<pgc->nr_of_programs-1; i++)
+    for(i=0; i<pgc->nr_of_programs; i++)
      {
          cell = pgc->program_map[i]; //here the cell is 1-based
          t2 = t/1000;
          mp_msg(MSGT_IDENTIFY, MSGL_INFO, "%02d:%02d:%02d,", t2/3600, 
(t2/60)%60, t2%60);
-        while(cell < pgc->program_map[i+1]) {
+        while(i+1<pgc->nr_of_programs && cell < pgc->program_map[i+1]) {
              if(!(pgc->cell_playback[cell-1].block_type == 
BLOCK_TYPE_ANGLE_BLOCK &&
                   pgc->cell_playback[cell-1].block_mode != 
BLOCK_MODE_FIRST_CELL)
              )



More information about the MPlayer-users mailing list