[Mplayer-cvslog] CVS: main open.c,1.6,1.7
Arpi of Ize
arpi at mplayer.dev.hu
Tue Aug 21 22:13:07 CEST 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv28456
Modified Files:
open.c
Log Message:
ugly seeking bug fixed, correct multiangle seek implemented
Index: open.c
===================================================================
RCS file: /cvsroot/mplayer/main/open.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- open.c 20 Aug 2001 21:20:03 -0000 1.6
+++ open.c 21 Aug 2001 20:12:48 -0000 1.7
@@ -50,6 +50,7 @@
// Navi:
int packs_left;
dsi_t dsi_pack;
+ int angle_seek;
} dvd_priv_t;
#endif
@@ -209,6 +210,7 @@
d->cur_pgc = vts_file->vts_pgcit->pgci_srp[pgc_id-1].pgc;
d->cur_cell = d->cur_pgc->program_map[pgn-1] - 1; // start playback here
d->packs_left=-1; // for Navi stuff
+ d->angle_seek=0;
if( d->cur_pgc->cell_playback[d->cur_cell].block_type
== BLOCK_TYPE_ANGLE_BLOCK ) d->cur_cell+=dvd_angle;
@@ -352,6 +354,12 @@
// process!
d->packs_left = d->dsi_pack.dsi_gi.vobu_ea;
mp_msg(MSGT_DVD,MSGL_DBG2, "Found NAVI packet! lba=0x%X len=%d \n",d->cur_pack,d->packs_left);
+ if(d->angle_seek){
+ int skip=d->dsi_pack.sml_agli.data[dvd_angle].address;
+ if(skip) d->cur_pack=d->dsi_pack.dsi_gi.nv_pck_lbn+skip;
+ d->angle_seek=0;
+ mp_msg(MSGT_DVD,MSGL_V, "Angle-seek synced! skip=%d new_lba=0x%X \n",skip,d->cur_pack);
+ }
}
++d->cur_pack;
goto read_next;
@@ -359,6 +367,8 @@
++d->cur_pack;
if(d->packs_left>=0) --d->packs_left;
+
+ if(d->angle_seek) goto read_next; // searching for Navi packet
return d->cur_pack-1;
}
@@ -368,7 +378,7 @@
d->cur_pack=pos;
// check if we stay in current cell (speedup things, and avoid angle skip)
-if(d->cur_pack>d->cell_last_pack &&
+if(d->cur_pack>d->cell_last_pack ||
d->cur_pack<d->cur_pgc->cell_playback[ d->cur_cell ].first_sector){
// ok, cell change, find the right cell!
@@ -391,13 +401,15 @@
}
d->cur_cell=next;
}
+
}
mp_msg(MSGT_DVD,MSGL_V, "DVD Seek! lba=0x%X cell=%d packs: 0x%X-0x%X \n",
d->cur_pack,d->cur_cell,d->cur_pgc->cell_playback[ d->cur_cell ].first_sector,d->cell_last_pack);
-// TODO: if we're in interleaved multi-angle cell, find the right angle chain!
+// if we're in interleaved multi-angle cell, find the right angle chain!
// (read Navi block, and use the seamless angle jump table)
+d->angle_seek=1;
}
More information about the MPlayer-cvslog
mailing list