summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-03-27 13:46:47 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-03-27 13:46:47 +0000
commit1a6b7ebd75e9cc3e1262212d58cd005a7c1707fa (patch)
tree13220b5db37c45bde6289cf918a32b528030622e /src
parentf89b6a72297eaee4c5b8ccc20639829e0f5f0313 (diff)
downloadxine-lib-1a6b7ebd75e9cc3e1262212d58cd005a7c1707fa.tar.gz
xine-lib-1a6b7ebd75e9cc3e1262212d58cd005a7c1707fa.tar.bz2
sync to libdvdnav cvs
* fix conversion of dvd_time_t (I do know BCD, I just did it wrong...) CVS patchset: 4496 CVS date: 2003/03/27 13:46:47
Diffstat (limited to 'src')
-rw-r--r--src/input/libdvdnav/dvdnav.c18
-rw-r--r--src/input/libdvdnav/vm.c16
2 files changed, 23 insertions, 11 deletions
diff --git a/src/input/libdvdnav/dvdnav.c b/src/input/libdvdnav/dvdnav.c
index 89b965fe3..b56d6519e 100644
--- a/src/input/libdvdnav/dvdnav.c
+++ b/src/input/libdvdnav/dvdnav.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dvdnav.c,v 1.19 2003/03/25 13:17:20 mroi Exp $
+ * $Id: dvdnav.c,v 1.20 2003/03/27 13:46:47 mroi Exp $
*
*/
@@ -210,14 +210,16 @@ static int64_t dvdnav_convert_time(dvd_time_t *time) {
int64_t result;
int frames;
- result = (time->hour & 0xf0) * 10 * 60 * 60 * 90000;
+ result = (time->hour >> 4 ) * 10 * 60 * 60 * 90000;
result += (time->hour & 0x0f) * 60 * 60 * 90000;
- result += (time->minute & 0xf0) * 10 * 60 * 90000;
+ result += (time->minute >> 4 ) * 10 * 60 * 90000;
result += (time->minute & 0x0f) * 60 * 90000;
- result += (time->second & 0xf0) * 10 * 90000;
+ result += (time->second >> 4 ) * 10 * 90000;
result += (time->second & 0x0f) * 90000;
- frames = (time->frame_u & 0x30) * 10 ;
- frames += (time->frame_u & 0x0f) ;
+
+ frames = ((time->frame_u & 0x30) >> 4) * 10;
+ frames += ((time->frame_u & 0x0f) ) ;
+
if (time->frame_u & 0x80)
result += frames * 3000;
else
@@ -1016,6 +1018,10 @@ uint32_t dvdnav_get_next_still_flag(dvdnav_t *this) {
/*
* $Log: dvdnav.c,v $
+ * Revision 1.20 2003/03/27 13:46:47 mroi
+ * sync to libdvdnav cvs
+ * * fix conversion of dvd_time_t (I do know BCD, I just did it wrong...)
+ *
* Revision 1.19 2003/03/25 13:17:20 mroi
* sync to cvs of libdvdnav
* * optional PGC based seeking
diff --git a/src/input/libdvdnav/vm.c b/src/input/libdvdnav/vm.c
index fe07b76be..c63c0cd1a 100644
--- a/src/input/libdvdnav/vm.c
+++ b/src/input/libdvdnav/vm.c
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: vm.c,v 1.15 2003/03/25 13:17:22 mroi Exp $
+ * $Id: vm.c,v 1.16 2003/03/27 13:46:47 mroi Exp $
*
*/
@@ -444,11 +444,11 @@ void vm_position_get(vm_t *vm, vm_position_t *position) {
int time;
int size = (vm->state).pgc->cell_playback[(vm->state).cellN - 1].last_sector -
(vm->state).pgc->cell_playback[(vm->state).cellN - 1].first_sector;
- time = ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.hour & 0xf0) * 36000;
+ time = ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.hour >> 4 ) * 36000;
time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.hour & 0x0f) * 3600;
- time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.minute & 0xf0) * 600;
+ time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.minute >> 4 ) * 600;
time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.minute & 0x0f) * 60;
- time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.second & 0xf0) * 10;
+ time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.second >> 4 ) * 10;
time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.second & 0x0f) * 1;
if (size / time > 30)
/* datarate is too high, it might be a very short, but regular cell */
@@ -474,7 +474,9 @@ int vm_jump_pg(vm_t *vm, int pg) {
int vm_jump_cell_block(vm_t *vm, int cell, int block) {
(vm->state).cellN = cell;
process_command(vm, play_Cell(vm));
- (vm->state).blockN = block;
+ /* play_Cell can jump to a different cell in case of angles */
+ if ((vm->state).cellN == cell)
+ (vm->state).blockN = block;
return 1;
}
@@ -1805,6 +1807,10 @@ void vm_position_print(vm_t *vm, vm_position_t *position) {
/*
* $Log: vm.c,v $
+ * Revision 1.16 2003/03/27 13:46:47 mroi
+ * sync to libdvdnav cvs
+ * * fix conversion of dvd_time_t (I do know BCD, I just did it wrong...)
+ *
* Revision 1.15 2003/03/25 13:17:22 mroi
* sync to cvs of libdvdnav
* * optional PGC based seeking