Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / libdvdnav / files / dvdnav-xine-lib-1.1.12.patch
1 diff -Naur libdvdnav-0.1.10-org/src/dvdnav.c libdvdnav-0.1.10/src/dvdnav.c
2 --- libdvdnav-0.1.10-org/src/dvdnav.c   2004-01-31 18:12:58.000000000 +0100
3 +++ libdvdnav-0.1.10/src/dvdnav.c       2008-03-28 15:24:50.000000000 +0100
4 @@ -16,9 +16,6 @@
5   * You should have received a copy of the GNU General Public License
6   * along with this program; if not, write to the Free Software
7   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
8 - *
9 - * $Id: dvdnav.c,v 1.63 2004/01/31 17:12:58 jcdutton Exp $
10 - *
11   */
12  
13  #ifdef HAVE_CONFIG_H
14 @@ -67,7 +64,7 @@
15    struct timeval time;
16    
17    /* Create a new structure */
18 -  fprintf(MSG_OUT, "libdvdnav: Using dvdnav version %s from http://dvd.sf.net\n", VERSION);
19 +  fprintf(MSG_OUT, "libdvdnav: Using dvdnav version %s from http://xine.sf.net\n", VERSION);
20  
21    (*dest) = NULL;
22    this = (dvdnav_t*)malloc(sizeof(dvdnav_t));
23 @@ -203,7 +200,7 @@
24  }
25  
26  /* converts a dvd_time_t to PTS ticks */
27 -static int64_t dvdnav_convert_time(dvd_time_t *time) {
28 +int64_t dvdnav_convert_time(dvd_time_t *time) {
29    int64_t result;
30    int64_t frames;
31    
32 @@ -403,7 +400,10 @@
33    
34    if(!this->started) {
35      /* Start the VM */
36 -    vm_start(this->vm);
37 +    if (!vm_start(this->vm)) {
38 +      printerr("Encrypted or faulty DVD");
39 +      return DVDNAV_STATUS_ERR;
40 +    }
41      this->started = 1;
42    }
43  
44 @@ -665,16 +665,10 @@
45      fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE stream_id_wide=%d\n",stream_change->physical_wide);
46      fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE stream_id_letterbox=%d\n",stream_change->physical_letterbox);
47      fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE stream_id_pan_scan=%d\n",stream_change->physical_pan_scan);
48 +    fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE returning DVDNAV_STATUS_OK\n");
49  #endif
50 -    if (stream_change->physical_wide != -1 &&
51 -        stream_change->physical_letterbox != -1 &&
52 -        stream_change->physical_pan_scan != -1) {
53 -#ifdef LOG_DEBUG
54 -      fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE returning DVDNAV_STATUS_OK\n");
55 -#endif
56 -      pthread_mutex_unlock(&this->vm_lock); 
57 -      return DVDNAV_STATUS_OK;
58 -    }
59 +    pthread_mutex_unlock(&this->vm_lock); 
60 +    return DVDNAV_STATUS_OK;
61    }
62  
63    /* has the audio channel changed? */  
64 diff -Naur libdvdnav-0.1.10-org/src/dvdnav_events.h libdvdnav-0.1.10/src/dvdnav_events.h
65 --- libdvdnav-0.1.10-org/src/dvdnav_events.h    2003-04-27 03:26:18.000000000 +0200
66 +++ libdvdnav-0.1.10/src/dvdnav_events.h        2008-01-23 06:11:52.000000000 +0100
67 @@ -16,9 +16,6 @@
68   * You should have received a copy of the GNU General Public License
69   * along with this program; if not, write to the Free Software
70   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
71 - *
72 - * $Id: dvdnav_events.h,v 1.12 2003/04/27 01:26:18 jcdutton Exp $
73 - *
74   */
75  
76  /*
77 diff -Naur libdvdnav-0.1.10-org/src/dvdnav.h libdvdnav-0.1.10/src/dvdnav.h
78 --- libdvdnav-0.1.10-org/src/dvdnav.h   2003-06-09 17:17:44.000000000 +0200
79 +++ libdvdnav-0.1.10/src/dvdnav.h       2008-01-23 06:11:52.000000000 +0100
80 @@ -16,9 +16,6 @@
81   * You should have received a copy of the GNU General Public License
82   * along with this program; if not, write to the Free Software
83   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
84 - *
85 - * $Id: dvdnav.h,v 1.31 2003/06/09 15:17:44 mroi Exp $
86 - *
87   */
88  
89  /*
90 @@ -114,6 +111,8 @@
91   */
92  const char* dvdnav_err_to_string(dvdnav_t *self);
93  
94 +/* converts a dvd_time_t to PTS ticks */
95 +int64_t dvdnav_convert_time(dvd_time_t *time);
96  
97  /*********************************************************************
98   * changing and reading DVD player characteristics                   *
99 diff -Naur libdvdnav-0.1.10-org/src/dvdnav_internal.h libdvdnav-0.1.10/src/dvdnav_internal.h
100 --- libdvdnav-0.1.10-org/src/dvdnav_internal.h  2004-02-13 20:16:17.000000000 +0100
101 +++ libdvdnav-0.1.10/src/dvdnav_internal.h      2008-03-28 15:24:50.000000000 +0100
102 @@ -1,5 +1,5 @@
103  /* 
104 - * Copyright (C) 2001 Rich Wareham <richwareham@users.sourceforge.net>
105 + * Copyright (C) 2001-2004 Rich Wareham <richwareham@users.sourceforge.net>
106   * 
107   * This file is part of libdvdnav, a DVD navigation library.
108   * 
109 @@ -16,9 +16,6 @@
110   * You should have received a copy of the GNU General Public License
111   * along with this program; if not, write to the Free Software
112   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
113 - *
114 - * $Id: dvdnav_internal.h,v 1.12 2004/02/13 19:16:17 mroi Exp $
115 - *
116   */
117  
118  #ifndef DVDNAV_INTERNAL_H_INCLUDED
119 @@ -34,6 +31,34 @@
120  #include <limits.h>
121  #include <string.h>
122  
123 +#ifndef HAVE_GETTIMEOFDAY
124 +#  ifdef WIN32
125 +#    include <winsock.h>
126 +struct timezone;
127 +#  else
128 +#    include <sys/time.h>
129 +#  endif
130 +/* replacement gettimeofday implementation */
131 +#include <sys/timeb.h>
132 +static inline int dvdnav_private_gettimeofday( struct timeval *tv, void *tz )
133 +{
134 +  struct timeb t;
135 +  ftime( &t );
136 +  tv->tv_sec = t.time;
137 +  tv->tv_usec = t.millitm * 1000;
138 +  return 0;
139 +}
140 +#define gettimeofday(TV, TZ) dvdnav_private_gettimeofday((TV), (TZ))
141 +#define HAVE_GETTIMEOFDAY 1
142 +#endif
143 +
144 +#ifndef HAVE_SNPRINTF
145 +#  ifdef HAVE__SNPRINTF
146 +#    define snprintf _snprintf
147 +#    define HAVE_SNPRINTF 1
148 +#  endif
149 +#endif
150 +
151  #ifdef WIN32
152  
153  /* pthread_mutex_* wrapper for win32 */
154 @@ -45,16 +70,6 @@
155  #define pthread_mutex_unlock(a)  LeaveCriticalSection(a)
156  #define pthread_mutex_destroy(a)
157  
158 -/* replacement gettimeofday implementation */
159 -#include <sys/timeb.h>
160 -static inline int gettimeofday( struct timeval *tv, void *tz )
161 -{
162 -  struct timeb t;
163 -  ftime( &t );
164 -  tv->tv_sec = t.time;
165 -  tv->tv_usec = t.millitm * 1000;
166 -  return 0;
167 -}
168  #include <io.h> /* read() */
169  #define lseek64 _lseeki64
170  
171 @@ -184,15 +199,38 @@
172  
173  /** USEFUL MACROS **/
174  
175 +/* printerr*() are often called when this is NULL. Avoid segfaults by replacing these with
176 + * more common prints
177 + */
178  #ifdef __GNUC__
179 -#define printerrf(format, args...) snprintf(this->err_str, MAX_ERR_LEN, format, ## args);
180 +#define printerrf(format, args...)                                     \
181 +  do {                                                                 \
182 +    if ( ! this ) fprintf(stderr, "Missing 'this' pointer while erroring:" format "\n", ## args); \
183 +    else snprintf(this->err_str, MAX_ERR_LEN, format, ## args);                \
184 +  } while(0);
185  #else
186  #ifdef _MSC_VER
187  #define printerrf(str) snprintf(this->err_str, MAX_ERR_LEN, str);
188  #else
189 -#define printerrf(...) snprintf(this->err_str, MAX_ERR_LEN, __VA_ARGS__);
190 +#define printerrf(...)                                          \
191 +  do {                                                          \
192 +    if ( ! this ) {                                             \
193 +      fprintf(stderr, "Missing 'this' pointer while erroring:"); \
194 +      fprintf(stderr, __VA_ARGS__);                             \
195 +      fprintf(stderr, "\n");                                    \
196 +    } else {                                                    \
197 +      snprintf(this->err_str, MAX_ERR_LEN, __VA_ARGS__);        \
198 +    }                                                           \
199 +  } while(0);
200  #endif /* WIN32 */
201  #endif
202 -#define printerr(str) strncpy(this->err_str, str, MAX_ERR_LEN);
203 +#define printerr(str)                                                  \
204 +  do {                                                                 \
205 +    if ( ! this ) {                                                    \
206 +      fprintf(stderr, "Missing 'this' pointer while erroring: %s\n", str); \
207 +    } else {                                                           \
208 +      strncpy(this->err_str, str, MAX_ERR_LEN);                                \
209 +    }                                                                  \
210 +  } while(0);
211  
212  #endif /* DVDNAV_INTERNAL_H_INCLUDED */
213 diff -Naur libdvdnav-0.1.10-org/src/dvdread/bswap.h libdvdnav-0.1.10/src/dvdread/bswap.h
214 --- libdvdnav-0.1.10-org/src/dvdread/bswap.h    2004-01-11 22:43:13.000000000 +0100
215 +++ libdvdnav-0.1.10/src/dvdread/bswap.h        2008-01-23 06:11:52.000000000 +0100
216 @@ -3,7 +3,7 @@
217  
218  /*
219   * Copyright (C) 2000, 2001 Billy Biggs <vektor@dumbterm.net>,
220 - *                          Håkan Hjort <d95hjort@dtek.chalmers.se>
221 + *                          Håkan Hjort <d95hjort@dtek.chalmers.se>
222   *
223   * This program is free software; you can redistribute it and/or modify
224   * it under the terms of the GNU General Public License as published by
225 @@ -35,12 +35,24 @@
226  #include <sys/param.h>
227  #endif
228  
229 -#if defined(__linux__)
230 +#if defined(__linux__) || defined(__GLIBC__)
231  #include <byteswap.h>
232  #define B2N_16(x) x = bswap_16(x)
233  #define B2N_32(x) x = bswap_32(x)
234  #define B2N_64(x) x = bswap_64(x)
235  
236 +#elif defined(__SVR4) && defined(__sun)
237 +#include <sys/byteorder.h>
238 +#define B2N_16(x) x = BSWAP_16(x)
239 +#define B2N_32(x) x = BSWAP_32(x)
240 +#define B2N_64(x) x = BSWAP_64(x)
241 +
242 +#elif defined(__APPLE__)
243 +#include <libkern/OSByteOrder.h>
244 +#define B2N_16(x) x = OSSwapBigToHostInt16(x)
245 +#define B2N_32(x) x = OSSwapBigToHostInt32(x)
246 +#define B2N_64(x) x = OSSwapBigToHostInt64(x)
247 +
248  #elif defined(__NetBSD__)
249  #include <sys/endian.h>
250  #define B2N_16(x) BE16TOH(x)
251 @@ -61,11 +73,11 @@
252  
253  /* This is a slow but portable implementation, it has multiple evaluation 
254   * problems so beware.
255 - * Old FreeBSD's and Solaris don't have <byteswap.h> or any other such 
256 + * Old FreeBSD and Windows don't have <byteswap.h> or any other such 
257   * functionality! 
258   */
259  
260 -#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__)
261 +#elif defined(__FreeBSD__) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__)
262  #define B2N_16(x) \
263   x = ((((x) & 0xff00) >> 8) | \
264        (((x) & 0x00ff) << 8))
265 diff -Naur libdvdnav-0.1.10-org/src/dvdread/dvd_input.c libdvdnav-0.1.10/src/dvdread/dvd_input.c
266 --- libdvdnav-0.1.10-org/src/dvdread/dvd_input.c        2004-04-09 14:15:26.000000000 +0200
267 +++ libdvdnav-0.1.10/src/dvdread/dvd_input.c    2008-01-23 06:11:52.000000000 +0100
268 @@ -1,6 +1,6 @@
269  /*
270   * Copyright (C) 2002 Samuel Hocevar <sam@zoy.org>,
271 - *                    Håkan Hjort <d95hjort@dtek.chalmers.se>
272 + *                    Håkan Hjort <d95hjort@dtek.chalmers.se>
273   *
274   * This program is free software; you can redistribute it and/or modify
275   * it under the terms of the GNU General Public License as published by
276 @@ -35,6 +35,7 @@
277  int         (*dvdinput_title) (dvd_input_t, int); 
278  int         (*dvdinput_read)  (dvd_input_t, void *, int, int);
279  char *      (*dvdinput_error) (dvd_input_t);
280 +int         (*dvdinput_is_encrypted) (dvd_input_t);
281  
282  #ifdef HAVE_DVDCSS_DVDCSS_H
283  /* linking to libdvdcss */
284 @@ -55,6 +56,73 @@
285  #include "../../msvc/contrib/dlfcn.c"
286  #endif
287  
288 +/* Copied from css.h */
289 +#define KEY_SIZE 5
290 +
291 +typedef uint8_t dvd_key_t[KEY_SIZE];
292 +
293 +typedef struct dvd_title_s
294 +{
295 +    int                 i_startlb;
296 +    dvd_key_t           p_key;
297 +    struct dvd_title_s *p_next;
298 +} dvd_title_t;
299 +
300 +typedef struct css_s
301 +{
302 +    int             i_agid;      /* Current Authenication Grant ID. */
303 +    dvd_key_t       p_bus_key;   /* Current session key. */
304 +    dvd_key_t       p_disc_key;  /* This DVD disc's key. */
305 +    dvd_key_t       p_title_key; /* Current title key. */
306 +} css_t;
307 +
308 +/* Copied from libdvdcss.h */
309 +
310 +#ifndef PATH_MAX
311 +#define PATH_MAX 4096
312 +#endif
313 +
314 +struct dvdcss_s
315 +{
316 +    /* File descriptor */
317 +    char * psz_device;
318 +    int    i_fd;
319 +    int    i_read_fd;
320 +    int    i_pos;
321 +
322 +    /* File handling */
323 +    void *pf_seek;
324 +    void *pf_read;
325 +    void *pf_readv;
326 +
327 +    /* Decryption stuff */
328 +    int          i_method;
329 +    css_t        css;
330 +    int          b_ioctls;
331 +    int          b_scrambled;
332 +    dvd_title_t *p_titles;
333 +
334 +    /* Key cache directory and pointer to the filename */
335 +    char   psz_cachefile[PATH_MAX];
336 +    char * psz_block;
337 +
338 +    /* Error management */
339 +    char * psz_error;
340 +    int    b_errors;
341 +    int    b_debug;
342 +
343 +#ifdef WIN32
344 +    int    b_file;
345 +    char * p_readv_buffer;
346 +    int    i_readv_buf_size;
347 +#endif
348 +
349 +#ifndef WIN32
350 +    int    i_raw_fd;
351 +#endif
352 +};
353 +
354 +
355  typedef struct dvdcss_s *dvdcss_handle;
356  static dvdcss_handle (*DVDcss_open)  (const char *);
357  static int           (*DVDcss_close) (dvdcss_handle);
358 @@ -149,8 +217,13 @@
359    return 0;
360  }
361  
362 -
363 -
364 +static int css_is_encrypted (dvd_input_t dev)
365 +{
366 +  if (dev->dvdcss == NULL) {
367 +    return 0;
368 +  }
369 +  return dev->dvdcss->b_scrambled;
370 +}
371  
372  
373  
374 @@ -269,6 +342,10 @@
375    return 0;
376  }
377  
378 +static int file_is_encrypted (dvd_input_t dev)
379 +{
380 +  return 0;
381 +}
382  
383  /**
384   * Setup read functions with either libdvdcss or minimal DVD access.
385 @@ -287,10 +364,12 @@
386  #else
387    /* dlopening libdvdcss */
388  
389 -#ifndef WIN32
390 -  dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
391 -#else
392 +#ifdef HOST_OS_DARWIN
393 +  dvdcss_library = dlopen("libdvdcss.2.dylib", RTLD_LAZY);
394 +#elif defined(WIN32)
395    dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY);
396 +#else
397 +  dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
398  #endif
399  
400    if(dvdcss_library != NULL) {
401 @@ -323,7 +402,7 @@
402        dvdcss_library = NULL;
403      } else if(!DVDcss_open  || !DVDcss_close || !DVDcss_title || !DVDcss_seek
404               || !DVDcss_read || !DVDcss_error || !dvdcss_version) {
405 -      fprintf(stderr,  "libdvdread: Missing symbols in libdvdcss.so.2, "
406 +      fprintf(stderr,  "libdvdread: Missing symbols in libdvdcss, "
407               "this shouldn't happen !\n");
408        dlclose(dvdcss_library);
409      }
410 @@ -347,6 +426,7 @@
411      dvdinput_title = css_title;
412      dvdinput_read  = css_read;
413      dvdinput_error = css_error;
414 +    dvdinput_is_encrypted = css_is_encrypted;
415      return 1;
416      
417    } else {
418 @@ -359,6 +439,7 @@
419      dvdinput_title = file_title;
420      dvdinput_read  = file_read;
421      dvdinput_error = file_error;
422 +    dvdinput_is_encrypted = file_is_encrypted;
423      return 0;
424    }
425  }
426 diff -Naur libdvdnav-0.1.10-org/src/dvdread/dvd_input.h libdvdnav-0.1.10/src/dvdread/dvd_input.h
427 --- libdvdnav-0.1.10-org/src/dvdread/dvd_input.h        2004-01-11 22:43:13.000000000 +0100
428 +++ libdvdnav-0.1.10/src/dvdread/dvd_input.h    2008-01-23 06:11:52.000000000 +0100
429 @@ -3,7 +3,7 @@
430  
431  /*
432   * Copyright (C) 2001, 2002 Samuel Hocevar <sam@zoy.org>,
433 - *                          Håkan Hjort <d95hjort@dtek.chalmers.se>
434 + *                          Håkan Hjort <d95hjort@dtek.chalmers.se>
435   *
436   * This program is free software; you can redistribute it and/or modify
437   * it under the terms of the GNU General Public License as published by
438 @@ -38,6 +38,7 @@
439  extern int         (*dvdinput_title) (dvd_input_t, int); 
440  extern int         (*dvdinput_read)  (dvd_input_t, void *, int, int);
441  extern char *      (*dvdinput_error) (dvd_input_t);
442 +extern int         (*dvdinput_is_encrypted) (dvd_input_t);
443  
444  /**
445   * Setup function accessed by dvd_reader.c.  Returns 1 if there is CSS support.
446 diff -Naur libdvdnav-0.1.10-org/src/dvdread/dvd_reader.c libdvdnav-0.1.10/src/dvdread/dvd_reader.c
447 --- libdvdnav-0.1.10-org/src/dvdread/dvd_reader.c       2004-03-03 17:48:36.000000000 +0100
448 +++ libdvdnav-0.1.10/src/dvdread/dvd_reader.c   2008-03-17 17:18:01.000000000 +0100
449 @@ -1,7 +1,7 @@
450  /*
451 - * Copyright (C) 2001, 2002, 2003 Billy Biggs <vektor@dumbterm.net>,
452 - *                                Håkan Hjort <d95hjort@dtek.chalmers.se>,
453 - *                                Björn Englund <d4bjorn@dtek.chalmers.se>
454 + * Copyright (C) 2001-2004 Billy Biggs <vektor@dumbterm.net>,
455 + *                         Håkan Hjort <d95hjort@dtek.chalmers.se>,
456 + *                         Björn Englund <d4bjorn@dtek.chalmers.se>
457   *
458   * This program is free software; you can redistribute it and/or modify
459   * it under the terms of the GNU General Public License as published by
460 @@ -32,11 +32,16 @@
461  #include <limits.h>
462  #include <dirent.h>
463  
464 -/* misc win32 helpers */
465 -#ifdef WIN32
466 +#ifndef HAVE_GETTIMEOFDAY
467 +#  ifdef WIN32
468 +#    include <winsock.h>
469 +struct timezone;
470 +#  else
471 +#    include <sys/time.h>
472 +#  endif
473  /* replacement gettimeofday implementation */
474  #include <sys/timeb.h>
475 -static inline int gettimeofday( struct timeval *tv, void *tz )
476 +static inline int _private_gettimeofday( struct timeval *tv, void *tz )
477  {
478    struct timeb t;
479    ftime( &t );
480 @@ -44,11 +49,16 @@
481    tv->tv_usec = t.millitm * 1000;
482    return 0;
483  }
484 +#define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ))
485 +#endif
486 +
487 +/* misc win32 helpers */
488 +#ifdef WIN32
489  #include <io.h> /* read() */
490  #define lseek64 _lseeki64
491  #endif
492   
493 -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)|| defined(__DARWIN__)
494 +#if defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)|| defined(__DARWIN__)
495  #define SYS_BSD 1
496  #endif
497  
498 @@ -478,6 +489,13 @@
499                              me->mnt_fsname,
500                              me->mnt_dir );
501                      auth_drive = DVDOpenImageFile( me->mnt_fsname, have_css );
502 +                   /* If the device is not encrypted, don't access the device
503 +                    * directly as it would fail for non-UDF DVDs */
504 +                   if ( auth_drive && dvdinput_is_encrypted( auth_drive->dev ) == 0) {
505 +                     DVDClose( auth_drive );
506 +                     auth_drive = NULL;
507 +                     break;
508 +                   }
509                     dev_name = strdup(me->mnt_fsname);
510                      break;
511                  }
512 @@ -585,10 +603,12 @@
513              sprintf( filename, "%s%s%s", path,
514                       ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ),
515                       ent->d_name );
516 +            closedir (dir);
517              return 0;
518          }
519      }
520  
521 +    closedir (dir);
522      return -1;
523  }
524  
525 @@ -1017,6 +1037,28 @@
526      return offset;
527  }
528  
529 +int32_t DVDFileSeekForce( dvd_file_t *dvd_file, int offset, int force_size )
530 +{
531 +  /* Check arguments. */
532 +  if( dvd_file == NULL || offset < 0 )
533 +    return -1;
534 +
535 +  if( dvd_file->dvd->isImageFile ) {
536 +    if( force_size < 0 )
537 +      force_size = (offset - 1) / DVD_VIDEO_LB_LEN + 1;
538 +    if( dvd_file->filesize < force_size) {
539 +      dvd_file->filesize = force_size;
540 +      fprintf(stderr, "libdvdread: Ignored UDF provided size of file.\n");
541 +    }
542 +  }
543 +
544 +  if( offset > dvd_file->filesize * DVD_VIDEO_LB_LEN ) {
545 +    return -1;
546 +  }
547 +  dvd_file->seek_pos = (uint32_t) offset;
548 +  return offset;
549 +}
550 +
551  ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size )
552  {
553      unsigned char *secbuf_base, *secbuf;
554 @@ -1057,7 +1099,7 @@
555      memcpy( data, &(secbuf[ seek_byte ]), byte_size );
556      free( secbuf_base );
557  
558 -    dvd_file->seek_pos += byte_size;
559 +    DVDFileSeekForce(dvd_file, dvd_file->seek_pos + byte_size, -1);
560      return byte_size;
561  }
562  
563 diff -Naur libdvdnav-0.1.10-org/src/dvdread/dvd_reader.h libdvdnav-0.1.10/src/dvdread/dvd_reader.h
564 --- libdvdnav-0.1.10-org/src/dvdread/dvd_reader.h       2004-02-01 18:55:19.000000000 +0100
565 +++ libdvdnav-0.1.10/src/dvdread/dvd_reader.h   2008-03-28 15:24:50.000000000 +0100
566 @@ -3,8 +3,8 @@
567  
568  /*
569   * Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>,
570 - *                          Håkan Hjort <d95hjort@dtek.chalmers.se>,
571 - *                          Björn Englund <d4bjorn@dtek.chalmers.se>
572 + *                          Håkan Hjort <d95hjort@dtek.chalmers.se>,
573 + *                          Björn Englund <d4bjorn@dtek.chalmers.se>
574   *
575   * This program is free software; you can redistribute it and/or modify
576   * it under the terms of the GNU General Public License as published by
577 @@ -21,9 +21,11 @@
578   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
579   */
580  
581 -#ifdef _MSC_VER
582 +#ifdef HAVE_CONFIG_H
583  #include <config.h>
584 +#endif
585  
586 +#ifdef _MSC_VER
587  #include <stdio.h>
588  #include <stdlib.h>
589  #endif
590 @@ -169,6 +171,8 @@
591   */
592  int32_t DVDFileSeek( dvd_file_t *, int32_t );
593  
594 +int32_t DVDFileSeekForce( dvd_file_t *, int, int );
595 +
596  /**
597   * Reads the given number of bytes from the file.  This call can only be used
598   * on the information files, and may not be used for reading from a VOB.  This
599 diff -Naur libdvdnav-0.1.10-org/src/dvdread/dvd_udf.c libdvdnav-0.1.10/src/dvdread/dvd_udf.c
600 --- libdvdnav-0.1.10-org/src/dvdread/dvd_udf.c  2004-03-03 17:48:36.000000000 +0100
601 +++ libdvdnav-0.1.10/src/dvdread/dvd_udf.c      2008-03-07 15:19:43.000000000 +0100
602 @@ -4,7 +4,7 @@
603   *
604   * Modifications by:
605   *   Billy Biggs <vektor@dumbterm.net>.
606 - *   Björn Englund <d4bjorn@dtek.chalmers.se>.
607 + *   Björn Englund <d4bjorn@dtek.chalmers.se>.
608   *
609   * dvdudf: parse and read the UDF volume information of a DVD Video
610   * Copyright (C) 1999 Christian Wolff for convergence integrated media
611 diff -Naur libdvdnav-0.1.10-org/src/dvdread/dvd_udf.h libdvdnav-0.1.10/src/dvdread/dvd_udf.h
612 --- libdvdnav-0.1.10-org/src/dvdread/dvd_udf.h  2004-01-11 22:43:13.000000000 +0100
613 +++ libdvdnav-0.1.10/src/dvdread/dvd_udf.h      2008-01-23 06:11:52.000000000 +0100
614 @@ -7,7 +7,7 @@
615   *
616   * Modifications by:
617   *   Billy Biggs <vektor@dumbterm.net>.
618 - *   Björn Englund <d4bjorn@dtek.chalmers.se>.
619 + *   Björn Englund <d4bjorn@dtek.chalmers.se>.
620   * 
621   * dvdudf: parse and read the UDF volume information of a DVD Video
622   * Copyright (C) 1999 Christian Wolff for convergence integrated media
623 diff -Naur libdvdnav-0.1.10-org/src/dvdread/ifo_read.c libdvdnav-0.1.10/src/dvdread/ifo_read.c
624 --- libdvdnav-0.1.10-org/src/dvdread/ifo_read.c 2004-02-23 19:14:42.000000000 +0100
625 +++ libdvdnav-0.1.10/src/dvdread/ifo_read.c     2008-03-17 17:18:01.000000000 +0100
626 @@ -1,7 +1,7 @@
627  /*
628   * Copyright (C) 2000, 2001, 2002, 2003
629 - *               Björn Englund <d4bjorn@dtek.chalmers.se>, 
630 - *               Håkan Hjort <d95hjort@dtek.chalmers.se>
631 + *               Björn Englund <d4bjorn@dtek.chalmers.se>, 
632 + *               Håkan Hjort <d95hjort@dtek.chalmers.se>
633   *
634   * This program is free software; you can redistribute it and/or modify
635   * it under the terms of the GNU General Public License as published by
636 @@ -93,6 +93,10 @@
637    return (DVDFileSeek(dvd_file, (int)offset) == (int)offset);
638  }
639  
640 +static inline int32_t DVDFileSeekForce_( dvd_file_t *dvd_file, uint32_t offset, int force_size ) {
641 +  return (DVDFileSeekForce(dvd_file, (int)offset, force_size) == (int)offset);
642 +}
643 +
644  
645  ifo_handle_t *ifoOpen(dvd_reader_t *dvd, int title) {
646    ifo_handle_t *ifofile;
647 @@ -683,7 +687,7 @@
648      pgc->command_tbl = NULL;
649    }
650    
651 -  if(pgc->program_map_offset != 0) {
652 +  if(pgc->program_map_offset != 0 && pgc->nr_of_programs>0) {
653      pgc->program_map = malloc(pgc->nr_of_programs * sizeof(pgc_program_map_t));
654      if(!pgc->program_map) {
655        ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
656 @@ -699,7 +703,7 @@
657      pgc->program_map = NULL;
658    }
659    
660 -  if(pgc->cell_playback_offset != 0) {
661 +  if(pgc->cell_playback_offset != 0 && pgc->nr_of_cells>0) {
662      pgc->cell_playback = malloc(pgc->nr_of_cells * sizeof(cell_playback_t));
663      if(!pgc->cell_playback) {
664        ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
665 @@ -720,7 +724,7 @@
666      pgc->cell_playback = NULL;
667    }
668    
669 -  if(pgc->cell_position_offset != 0) {
670 +  if(pgc->cell_position_offset != 0 && pgc->nr_of_cells>0) {
671      pgc->cell_position = malloc(pgc->nr_of_cells * sizeof(cell_position_t));
672      if(!pgc->cell_position) {
673        ifoFree_PGC(pgc);
674 @@ -1507,7 +1511,7 @@
675    unsigned int i;
676    int info_length;
677  
678 -  if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN))
679 +  if(!DVDFileSeekForce_(ifofile->file, sector * DVD_BLOCK_LEN, sector))
680      return 0;
681  
682    if(!(DVDReadBytes(ifofile->file, vobu_admap, VOBU_ADMAP_SIZE)))
683 diff -Naur libdvdnav-0.1.10-org/src/dvdread/ifo_read.h libdvdnav-0.1.10/src/dvdread/ifo_read.h
684 --- libdvdnav-0.1.10-org/src/dvdread/ifo_read.h 2004-01-11 22:43:13.000000000 +0100
685 +++ libdvdnav-0.1.10/src/dvdread/ifo_read.h     2008-01-23 06:11:52.000000000 +0100
686 @@ -2,8 +2,8 @@
687  #define IFO_READ_H_INCLUDED
688  
689  /*
690 - * Copyright (C) 2000, 2001, 2002 Björn Englund <d4bjorn@dtek.chalmers.se>,
691 - *                                Håkan Hjort <d95hjort@dtek.chalmers.se>
692 + * Copyright (C) 2000, 2001, 2002 Björn Englund <d4bjorn@dtek.chalmers.se>,
693 + *                                Håkan Hjort <d95hjort@dtek.chalmers.se>
694   *
695   * This program is free software; you can redistribute it and/or modify
696   * it under the terms of the GNU General Public License as published by
697 diff -Naur libdvdnav-0.1.10-org/src/dvdread/ifo_types.h libdvdnav-0.1.10/src/dvdread/ifo_types.h
698 --- libdvdnav-0.1.10-org/src/dvdread/ifo_types.h        2004-01-11 22:43:13.000000000 +0100
699 +++ libdvdnav-0.1.10/src/dvdread/ifo_types.h    2008-01-23 06:11:52.000000000 +0100
700 @@ -2,8 +2,8 @@
701  #define IFO_TYPES_H_INCLUDED
702  
703  /*
704 - * Copyright (C) 2000, 2001 Björn Englund <d4bjorn@dtek.chalmers.se>,
705 - *                          Håkan Hjort <d95hjort@dtek.chalmers.se>
706 + * Copyright (C) 2000, 2001 Björn Englund <d4bjorn@dtek.chalmers.se>,
707 + *                          Håkan Hjort <d95hjort@dtek.chalmers.se>
708   *
709   * This program is free software; you can redistribute it and/or modify
710   * it under the terms of the GNU General Public License as published by
711 diff -Naur libdvdnav-0.1.10-org/src/dvdread/md5.c libdvdnav-0.1.10/src/dvdread/md5.c
712 --- libdvdnav-0.1.10-org/src/dvdread/md5.c      2004-01-11 22:43:13.000000000 +0100
713 +++ libdvdnav-0.1.10/src/dvdread/md5.c  2008-03-28 15:24:50.000000000 +0100
714 @@ -26,14 +26,8 @@
715  
716  #include <sys/types.h>
717  
718 -#if STDC_HEADERS || defined _LIBC
719 -# include <stdlib.h>
720 -# include <string.h>
721 -#else
722 -# ifndef HAVE_MEMCPY
723 -#  define memcpy(d, s, n) bcopy ((s), (d), (n))
724 -# endif
725 -#endif
726 +#include <stdlib.h>
727 +#include <string.h>
728  
729  #include "md5.h"
730  /* #include "unlocked-io.h" */
731 diff -Naur libdvdnav-0.1.10-org/src/dvdread/nav_print.c libdvdnav-0.1.10/src/dvdread/nav_print.c
732 --- libdvdnav-0.1.10-org/src/dvdread/nav_print.c        2004-01-11 22:43:13.000000000 +0100
733 +++ libdvdnav-0.1.10/src/dvdread/nav_print.c    2008-01-23 06:11:52.000000000 +0100
734 @@ -1,5 +1,5 @@
735  /*
736 - * Copyright (C) 2000, 2001, 2002, 2003 Håkan Hjort <d95hjort@dtek.chalmers.se>
737 + * Copyright (C) 2000, 2001, 2002, 2003 Håkan Hjort <d95hjort@dtek.chalmers.se>
738   *
739   * Much of the contents in this file is based on VOBDUMP.
740   *
741 @@ -65,7 +65,8 @@
742    printf("pci_gi:\n");
743    printf("nv_pck_lbn    0x%08x\n", pci_gi->nv_pck_lbn);
744    printf("vobu_cat      0x%04x\n", pci_gi->vobu_cat);
745 -  printf("vobu_uop_ctl  0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl);
746 +/* This will break strict aliasing, better avoid as this seems to be useless
747 +  printf("vobu_uop_ctl  0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl); */
748    printf("vobu_s_ptm    0x%08x\n", pci_gi->vobu_s_ptm);
749    printf("vobu_e_ptm    0x%08x\n", pci_gi->vobu_e_ptm);
750    printf("vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm);
751 diff -Naur libdvdnav-0.1.10-org/src/dvdread/nav_print.h libdvdnav-0.1.10/src/dvdread/nav_print.h
752 --- libdvdnav-0.1.10-org/src/dvdread/nav_print.h        2004-01-11 22:43:13.000000000 +0100
753 +++ libdvdnav-0.1.10/src/dvdread/nav_print.h    2008-01-23 06:11:52.000000000 +0100
754 @@ -3,7 +3,7 @@
755  
756  /*
757   * Copyright (C) 2001, 2002 Billy Biggs <vektor@dumbterm.net>,
758 - *                          Håkan Hjort <d95hjort@dtek.chalmers.se>
759 + *                          Håkan Hjort <d95hjort@dtek.chalmers.se>
760   *
761   * This program is free software; you can redistribute it and/or modify
762   * it under the terms of the GNU General Public License as published by
763 diff -Naur libdvdnav-0.1.10-org/src/dvdread/nav_read.c libdvdnav-0.1.10/src/dvdread/nav_read.c
764 --- libdvdnav-0.1.10-org/src/dvdread/nav_read.c 2004-03-03 17:50:41.000000000 +0100
765 +++ libdvdnav-0.1.10/src/dvdread/nav_read.c     2008-01-23 06:11:52.000000000 +0100
766 @@ -1,5 +1,5 @@
767  /*
768 - * Copyright (C) 2000, 2001, 2002, 2003 Håkan Hjort <d95hjort@dtek.chalmers.se>
769 + * Copyright (C) 2000, 2001, 2002, 2003 Håkan Hjort <d95hjort@dtek.chalmers.se>
770   *
771   * This program is free software; you can redistribute it and/or modify
772   * it under the terms of the GNU General Public License as published by
773 diff -Naur libdvdnav-0.1.10-org/src/dvdread/nav_read.h libdvdnav-0.1.10/src/dvdread/nav_read.h
774 --- libdvdnav-0.1.10-org/src/dvdread/nav_read.h 2004-01-11 22:43:13.000000000 +0100
775 +++ libdvdnav-0.1.10/src/dvdread/nav_read.h     2008-01-23 06:11:52.000000000 +0100
776 @@ -2,7 +2,7 @@
777  #define NAV_READ_H_INCLUDED
778  
779  /*
780 - * Copyright (C) 2000, 2001, 2002 Håkan Hjort <d95hjort@dtek.chalmers.se>.
781 + * Copyright (C) 2000, 2001, 2002 Håkan Hjort <d95hjort@dtek.chalmers.se>.
782   *
783   * This program is free software; you can redistribute it and/or modify
784   * it under the terms of the GNU General Public License as published by
785 diff -Naur libdvdnav-0.1.10-org/src/dvdread/nav_types.h libdvdnav-0.1.10/src/dvdread/nav_types.h
786 --- libdvdnav-0.1.10-org/src/dvdread/nav_types.h        2004-01-11 22:43:13.000000000 +0100
787 +++ libdvdnav-0.1.10/src/dvdread/nav_types.h    2008-01-23 06:11:52.000000000 +0100
788 @@ -2,7 +2,7 @@
789  #define NAV_TYPES_H_INCLUDED
790  
791  /*
792 - * Copyright (C) 2000, 2001, 2002 Håkan Hjort <d95hjort@dtek.chalmers.se>
793 + * Copyright (C) 2000, 2001, 2002 Håkan Hjort <d95hjort@dtek.chalmers.se>
794   *
795   * The data structures in this file should represent the layout of the
796   * pci and dsi packets as they are stored in the stream.  Information
797 diff -Naur libdvdnav-0.1.10-org/src/dvd_types.h libdvdnav-0.1.10/src/dvd_types.h
798 --- libdvdnav-0.1.10-org/src/dvd_types.h        2003-04-21 15:18:06.000000000 +0200
799 +++ libdvdnav-0.1.10/src/dvd_types.h    2008-01-23 06:11:52.000000000 +0100
800 @@ -1,5 +1,5 @@
801  /*
802 - * Copyright (C) 2000, 2001 Björn Englund, Håkan Hjort
803 + * Copyright (C) 2000, 2001 Björn Englund, Håkan Hjort
804   *
805   * This file is part of libdvdnav, a DVD navigation library. It is a modified
806   * file originally part of the Ogle DVD player project.
807 @@ -17,9 +17,6 @@
808   * You should have received a copy of the GNU General Public License
809   * along with this program; if not, write to the Free Software
810   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
811 - *
812 - * $Id: dvd_types.h,v 1.7 2003/04/21 13:18:06 mroi Exp $
813 - *
814   */
815  
816  /*
817 diff -Naur libdvdnav-0.1.10-org/src/highlight.c libdvdnav-0.1.10/src/highlight.c
818 --- libdvdnav-0.1.10-org/src/highlight.c        2004-01-20 02:22:24.000000000 +0100
819 +++ libdvdnav-0.1.10/src/highlight.c    2008-03-28 15:24:50.000000000 +0100
820 @@ -16,9 +16,6 @@
821   * You should have received a copy of the GNU General Public License
822   * along with this program; if not, write to the Free Software
823   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
824 - *
825 - * $Id: highlight.c,v 1.32 2004/01/20 01:22:24 jcdutton Exp $
826 - *
827   */
828  
829  #ifdef HAVE_CONFIG_H
830 diff -Naur libdvdnav-0.1.10-org/src/navigation.c libdvdnav-0.1.10/src/navigation.c
831 --- libdvdnav-0.1.10-org/src/navigation.c       2004-01-07 20:34:28.000000000 +0100
832 +++ libdvdnav-0.1.10/src/navigation.c   2008-03-28 15:24:50.000000000 +0100
833 @@ -16,9 +16,6 @@
834   * You should have received a copy of the GNU General Public License
835   * along with this program; if not, write to the Free Software
836   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
837 - *
838 - * $Id: navigation.c,v 1.21 2004/01/07 19:34:28 mroi Exp $
839 - *
840   */
841  
842  #ifdef HAVE_CONFIG_H
843 @@ -60,8 +57,8 @@
844      printerr("Passed a NULL pointer.");
845      return DVDNAV_STATUS_ERR;
846    }
847 -  if(!this->started) {
848 -    printerr("Virtual DVD machine not started.");
849 +  if (!this->vm->vmgi) {
850 +    printerr("Bad VM state.");
851      return DVDNAV_STATUS_ERR;
852    }
853  
854 @@ -75,8 +72,8 @@
855      printerr("Passed a NULL pointer.");
856      return DVDNAV_STATUS_ERR;
857    }
858 -  if(!this->started) {
859 -    printerr("Virtual DVD machine not started.");
860 +  if (!this->vm->vmgi) {
861 +    printerr("Bad VM state.");
862      return DVDNAV_STATUS_ERR;
863    }
864    if ((title < 1) || (title > vm_get_vmgi(this->vm)->tt_srpt->nr_of_srpts) ) {
865 @@ -103,6 +100,11 @@
866      pthread_mutex_unlock(&this->vm_lock);
867      return DVDNAV_STATUS_ERR;
868    }
869 +  if (!this->started) {
870 +    printerr("Virtual DVD machine not started.");
871 +    pthread_mutex_unlock(&this->vm_lock);
872 +    return DVDNAV_STATUS_ERR;
873 +  }
874    if (!this->vm->state.pgc) {
875      printerr("No current PGC.");
876      pthread_mutex_unlock(&this->vm_lock);
877 @@ -150,6 +152,11 @@
878      pthread_mutex_unlock(&this->vm_lock);
879      return DVDNAV_STATUS_ERR;
880    }
881 +  if (!this->started) {
882 +    /* don't report an error but be nice */
883 +    vm_start(this->vm);
884 +    this->started = 1;
885 +  }
886    if (!this->vm->state.pgc) {
887      printerr("No current PGC.");
888      pthread_mutex_unlock(&this->vm_lock);
889 diff -Naur libdvdnav-0.1.10-org/src/read_cache.c libdvdnav-0.1.10/src/read_cache.c
890 --- libdvdnav-0.1.10-org/src/read_cache.c       2004-03-03 17:48:36.000000000 +0100
891 +++ libdvdnav-0.1.10/src/read_cache.c   2008-03-28 15:24:50.000000000 +0100
892 @@ -17,9 +17,6 @@
893   * You should have received a copy of the GNU General Public License
894   * along with this program; if not, write to the Free Software
895   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
896 - *
897 - * $Id: read_cache.c,v 1.30 2004/03/03 16:48:36 mroi Exp $
898 - *
899   */
900  /*
901   * There was a multithreaded read ahead cache in here for some time, but
902 diff -Naur libdvdnav-0.1.10-org/src/read_cache.h libdvdnav-0.1.10/src/read_cache.h
903 --- libdvdnav-0.1.10-org/src/read_cache.h       2002-07-12 17:46:44.000000000 +0200
904 +++ libdvdnav-0.1.10/src/read_cache.h   2008-01-23 06:11:52.000000000 +0100
905 @@ -16,9 +16,6 @@
906   * You should have received a copy of the GNU General Public License
907   * along with this program; if not, write to the Free Software
908   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
909 - *
910 - * $Id: read_cache.h,v 1.4 2002/07/12 15:46:44 mroi Exp $
911 - *
912   */
913  
914  #ifndef __DVDNAV_READ_CACHE_H
915 diff -Naur libdvdnav-0.1.10-org/src/remap.c libdvdnav-0.1.10/src/remap.c
916 --- libdvdnav-0.1.10-org/src/remap.c    2003-08-27 15:54:19.000000000 +0200
917 +++ libdvdnav-0.1.10/src/remap.c        2008-03-07 15:19:43.000000000 +0100
918 @@ -14,22 +14,23 @@
919   * You should have received a copy of the GNU General Public License
920   * along with this program; if not, write to the Free Software
921   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
922 - *
923 - * $Id: remap.c,v 1.4 2003/08/27 13:54:19 mroi Exp $
924   */
925  
926  #include <stdlib.h>
927  #include <string.h>
928  #include <stdio.h>
929  
930 -#ifndef _MSC_VER 
931 +#ifdef HAVE_SYS_PARAM_H
932  #include <sys/param.h>
933 +#endif
934 +
935 +#ifdef HAVE_SYS_FCNTL_H
936  #include <sys/fcntl.h>
937  #else
938  #ifndef MAXPATHLEN
939  #define MAXPATHLEN 255
940  #endif
941 -#endif /* _MSC_VER */
942 +#endif /* HAVE fcntl.h */
943  
944  #include <assert.h>
945  #include "remap.h"
946 @@ -190,10 +191,7 @@
947  
948      /* Build the map filename */
949      home = getenv("HOME"); assert(home);
950 -    strncpy(fname, home, sizeof(fname));
951 -    strncat(fname, "/.dvdnav/", sizeof(fname));
952 -    strncat(fname, title, sizeof(fname));
953 -    strncat(fname, ".map", sizeof(fname));
954 +    snprintf (fname, sizeof(fname), "%s/.dvdnav/%s.map", home, title);
955  
956      /* Open the map file */
957      fp = fopen( fname, "r");
958 diff -Naur libdvdnav-0.1.10-org/src/remap.h libdvdnav-0.1.10/src/remap.h
959 --- libdvdnav-0.1.10-org/src/remap.h    2003-02-20 16:32:19.000000000 +0100
960 +++ libdvdnav-0.1.10/src/remap.h        2008-01-23 06:11:52.000000000 +0100
961 @@ -14,8 +14,6 @@
962   * You should have received a copy of the GNU General Public License
963   * along with this program; if not, write to the Free Software
964   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
965 - *
966 - * $Id: remap.h,v 1.2 2003/02/20 15:32:19 mroi Exp $
967   */
968  
969  #ifndef __REMAP__H
970 diff -Naur libdvdnav-0.1.10-org/src/searching.c libdvdnav-0.1.10/src/searching.c
971 --- libdvdnav-0.1.10-org/src/searching.c        2004-01-07 20:35:12.000000000 +0100
972 +++ libdvdnav-0.1.10/src/searching.c    2008-03-28 15:24:50.000000000 +0100
973 @@ -16,9 +16,6 @@
974   * You should have received a copy of the GNU General Public License
975   * along with this program; if not, write to the Free Software
976   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
977 - *
978 - * $Id: searching.c,v 1.35 2004/01/07 19:35:12 mroi Exp $
979 - *
980   */
981  
982  #ifdef HAVE_CONFIG_H
983 @@ -27,6 +24,7 @@
984  
985  #include <assert.h>
986  #include "dvdnav_internal.h"
987 +#include "dvdnav.h"
988  
989  /*
990  #define LOG_DEBUG
991 @@ -34,12 +32,6 @@
992  
993  /* Searching API calls */
994  
995 -dvdnav_status_t dvdnav_time_search(dvdnav_t *this,
996 -                                  uint64_t time) {
997 -  /* FIXME: Time search the current PGC based on the xxx table */
998 -  return DVDNAV_STATUS_OK;
999 -}
1000 -
1001  /* Scan the ADMAP for a particular block number. */
1002  /* Return placed in vobu. */
1003  /* Returns error status */
1004 @@ -101,6 +93,86 @@
1005    return DVDNAV_STATUS_ERR;
1006  }
1007  
1008 +dvdnav_status_t dvdnav_time_search(dvdnav_t *this,
1009 +                                  uint64_t time) {
1010 +  
1011 +  uint64_t target = time;
1012 +  uint64_t length = 0;
1013 +  uint32_t first_cell_nr, last_cell_nr, cell_nr;
1014 +  int32_t found;
1015 +  cell_playback_t *cell;
1016 +  dvd_state_t *state;
1017 +
1018 +  if(this->position_current.still != 0) {
1019 +    printerr("Cannot seek in a still frame.");
1020 +    return DVDNAV_STATUS_ERR;
1021 +  }
1022 +  
1023 +  pthread_mutex_lock(&this->vm_lock);
1024 +  state = &(this->vm->state);
1025 +  if(!state->pgc) {
1026 +    printerr("No current PGC.");
1027 +    pthread_mutex_unlock(&this->vm_lock);
1028 +    return DVDNAV_STATUS_ERR;
1029 +  }
1030 +
1031 +  
1032 +  if (this->pgc_based) {
1033 +    first_cell_nr = 1;
1034 +    last_cell_nr = state->pgc->nr_of_cells;
1035 +  } else {
1036 +    /* Find start cell of program. */
1037 +    first_cell_nr = state->pgc->program_map[state->pgN-1];
1038 +    /* Find end cell of program */
1039 +    if(state->pgN < state->pgc->nr_of_programs)
1040 +      last_cell_nr = state->pgc->program_map[state->pgN] - 1;
1041 +    else
1042 +      last_cell_nr = state->pgc->nr_of_cells;
1043 +  }
1044 +
1045 +  found = 0;
1046 +  for(cell_nr = first_cell_nr; (cell_nr <= last_cell_nr) && !found; cell_nr ++) {
1047 +    cell =  &(state->pgc->cell_playback[cell_nr-1]);
1048 +    length = dvdnav_convert_time(&cell->playback_time);
1049 +    if (target >= length) {
1050 +      target -= length;
1051 +    } else {
1052 +      /* FIXME: there must be a better way than interpolation */
1053 +      target = target * (cell->last_sector - cell->first_sector + 1) / length;
1054 +      target += cell->first_sector;
1055 +      
1056 +      found = 1;
1057 +      break;
1058 +    }
1059 +  }
1060 +
1061 +  if(found) {
1062 +    int32_t vobu;
1063 +#ifdef LOG_DEBUG
1064 +    fprintf(MSG_OUT, "libdvdnav: Seeking to cell %i from choice of %i to %i\n",
1065 +           cell_nr, first_cell_nr, last_cell_nr);
1066 +#endif
1067 +    if (dvdnav_scan_admap(this, state->domain, target, &vobu) == DVDNAV_STATUS_OK) {
1068 +      int32_t start = state->pgc->cell_playback[cell_nr-1].first_sector;
1069 +      
1070 +      if (vm_jump_cell_block(this->vm, cell_nr, vobu - start)) {
1071 +#ifdef LOG_DEBUG
1072 +        fprintf(MSG_OUT, "libdvdnav: After cellN=%u blockN=%u target=%x vobu=%x start=%x\n" ,
1073 +          state->cellN, state->blockN, target, vobu, start);
1074 +#endif
1075 +        this->vm->hop_channel += HOP_SEEK;
1076 +        pthread_mutex_unlock(&this->vm_lock);
1077 +        return DVDNAV_STATUS_OK;
1078 +      }
1079 +    }
1080 +  }
1081 +  
1082 +  fprintf(MSG_OUT, "libdvdnav: Error when seeking\n");
1083 +  printerr("Error when seeking.");
1084 +  pthread_mutex_unlock(&this->vm_lock);
1085 +  return DVDNAV_STATUS_ERR;
1086 +}
1087 +
1088  dvdnav_status_t dvdnav_sector_search(dvdnav_t *this,
1089                                      uint64_t offset, int32_t origin) {
1090    uint32_t target = 0;
1091 diff -Naur libdvdnav-0.1.10-org/src/settings.c libdvdnav-0.1.10/src/settings.c
1092 --- libdvdnav-0.1.10-org/src/settings.c 2003-12-31 22:37:16.000000000 +0100
1093 +++ libdvdnav-0.1.10/src/settings.c     2008-03-28 15:24:50.000000000 +0100
1094 @@ -16,9 +16,6 @@
1095   * You should have received a copy of the GNU General Public License
1096   * along with this program; if not, write to the Free Software
1097   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
1098 - *
1099 - * $Id: settings.c,v 1.9 2003/12/31 21:37:16 jcdutton Exp $
1100 - *
1101   */
1102  
1103  #ifdef HAVE_CONFIG_H
1104 diff -Naur libdvdnav-0.1.10-org/src/vm/decoder.c libdvdnav-0.1.10/src/vm/decoder.c
1105 --- libdvdnav-0.1.10-org/src/vm/decoder.c       2004-03-03 17:50:42.000000000 +0100
1106 +++ libdvdnav-0.1.10/src/vm/decoder.c   2008-03-28 15:24:50.000000000 +0100
1107 @@ -1,5 +1,5 @@
1108  /*
1109 - * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort
1110 + * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort
1111   *               2002-2004 the dvdnav project
1112   * 
1113   * This file is part of libdvdnav, a DVD navigation library. It is modified
1114 @@ -18,9 +18,6 @@
1115   * You should have received a copy of the GNU General Public License
1116   * along with this program; if not, write to the Free Software
1117   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
1118 - *
1119 - * $Id: decoder.c,v 1.2 2004/03/03 16:50:42 mroi Exp $
1120 - *
1121   */
1122  
1123  #ifdef HAVE_CONFIG_H
1124 diff -Naur libdvdnav-0.1.10-org/src/vm/decoder.h libdvdnav-0.1.10/src/vm/decoder.h
1125 --- libdvdnav-0.1.10-org/src/vm/decoder.h       2004-01-11 22:43:13.000000000 +0100
1126 +++ libdvdnav-0.1.10/src/vm/decoder.h   2008-01-23 06:11:52.000000000 +0100
1127 @@ -1,5 +1,5 @@
1128  /*
1129 - * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort
1130 + * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort
1131   * 
1132   * This file is part of libdvdnav, a DVD navigation library. It is modified
1133   * from a file originally part of the Ogle DVD player.
1134 @@ -17,9 +17,6 @@
1135   * You should have received a copy of the GNU General Public License
1136   * along with this program; if not, write to the Free Software
1137   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
1138 - *
1139 - * $Id: decoder.h,v 1.1 2004/01/11 21:43:13 mroi Exp $
1140 - *
1141   */
1142  
1143  #ifndef DECODER_H_INCLUDED
1144 diff -Naur libdvdnav-0.1.10-org/src/vm/vm.c libdvdnav-0.1.10/src/vm/vm.c
1145 --- libdvdnav-0.1.10-org/src/vm/vm.c    2004-05-21 21:32:25.000000000 +0200
1146 +++ libdvdnav-0.1.10/src/vm/vm.c        2008-03-28 15:24:50.000000000 +0100
1147 @@ -1,5 +1,5 @@
1148  /*
1149 - * Copyright (C) 2000, 2001 Håkan Hjort
1150 + * Copyright (C) 2000, 2001 Håkan Hjort
1151   * Copyright (C) 2001 Rich Wareham <richwareham@users.sourceforge.net>
1152   *               2002-2004 the dvdnav project
1153   * 
1154 @@ -19,9 +19,6 @@
1155   * You should have received a copy of the GNU General Public License
1156   * along with this program; if not, write to the Free Software
1157   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
1158 - *
1159 - * $Id: vm.c,v 1.6 2004/05/21 19:32:25 mroi Exp $
1160 - *
1161   */
1162  
1163  #ifdef HAVE_CONFIG_H
1164 @@ -184,9 +181,9 @@
1165    }
1166  }
1167  
1168 -static void ifoOpenNewVTSI(vm_t *vm, dvd_reader_t *dvd, int vtsN) {
1169 +static int ifoOpenNewVTSI(vm_t *vm, dvd_reader_t *dvd, int vtsN) {
1170    if((vm->state).vtsN == vtsN) {
1171 -    return; /*  We alread have it */
1172 +    return 1; /*  We alread have it */
1173    }
1174    
1175    if(vm->vtsi != NULL)
1176 @@ -194,30 +191,32 @@
1177    
1178    vm->vtsi = ifoOpenVTSI(dvd, vtsN);
1179    if(vm->vtsi == NULL) {
1180 -    fprintf(MSG_OUT, "libdvdnav: ifoOpenVTSI failed - CRASHING!!!\n");
1181 -    assert(0);
1182 +    fprintf(MSG_OUT, "libdvdnav: ifoOpenVTSI failed\n");
1183 +    return 0;
1184    }
1185    if(!ifoRead_VTS_PTT_SRPT(vm->vtsi)) {
1186 -    fprintf(MSG_OUT, "libdvdnav: ifoRead_VTS_PTT_SRPT failed - CRASHING!!!\n");
1187 -    assert(0);
1188 +    fprintf(MSG_OUT, "libdvdnav: ifoRead_VTS_PTT_SRPT failed\n");
1189 +    return 0;
1190    }
1191    if(!ifoRead_PGCIT(vm->vtsi)) {
1192 -    fprintf(MSG_OUT, "libdvdnav: ifoRead_PGCIT failed - CRASHING!!!\n");
1193 -    assert(0);
1194 +    fprintf(MSG_OUT, "libdvdnav: ifoRead_PGCIT failed\n");
1195 +    return 0;
1196    }
1197    if(!ifoRead_PGCI_UT(vm->vtsi)) {
1198 -    fprintf(MSG_OUT, "libdvdnav: ifoRead_PGCI_UT failed - CRASHING!!!\n");
1199 -    assert(0);
1200 +    fprintf(MSG_OUT, "libdvdnav: ifoRead_PGCI_UT failed\n");
1201 +    return 0;
1202    }
1203    if(!ifoRead_VOBU_ADMAP(vm->vtsi)) {
1204 -    fprintf(MSG_OUT, "libdvdnav: ifoRead_VOBU_ADMAP vtsi failed - CRASHING\n");
1205 -    assert(0);
1206 +    fprintf(MSG_OUT, "libdvdnav: ifoRead_VOBU_ADMAP vtsi failed\n");
1207 +    return 0;
1208    }
1209    if(!ifoRead_TITLE_VOBU_ADMAP(vm->vtsi)) {
1210 -    fprintf(MSG_OUT, "libdvdnav: ifoRead_TITLE_VOBU_ADMAP vtsi failed - CRASHING\n");
1211 -    assert(0);
1212 +    fprintf(MSG_OUT, "libdvdnav: ifoRead_TITLE_VOBU_ADMAP vtsi failed\n");
1213 +    return 0;
1214    }
1215    (vm->state).vtsN = vtsN;
1216 +  
1217 +  return 1;
1218  }
1219  
1220  
1221 @@ -253,10 +252,11 @@
1222  
1223  /* Basic Handling */
1224  
1225 -void vm_start(vm_t *vm) {
1226 +int vm_start(vm_t *vm) {
1227    /* Set pgc to FP (First Play) pgc */
1228    set_FP_PGC(vm);
1229    process_command(vm, play_PGC(vm));
1230 +  return !vm->stopped;
1231  }
1232  
1233  void vm_stop(vm_t *vm) {
1234 @@ -382,7 +382,8 @@
1235    vtsN = (target->state).vtsN;
1236    if (vtsN > 0) {
1237      (target->state).vtsN = 0;
1238 -    ifoOpenNewVTSI(target, target->dvd, vtsN);
1239 +    if (!ifoOpenNewVTSI(target, target->dvd, vtsN))
1240 +      assert(0);
1241    
1242      /* restore pgc pointer into the new vtsi */
1243      if (!set_PGCN(target, pgcN))
1244 @@ -712,8 +713,8 @@
1245      }
1246    }
1247    
1248 - if((vm->state).domain != VTS_DOMAIN && streamN == -1)
1249 -   streamN = 0;
1250 +  if((vm->state).domain != VTS_DOMAIN && streamN == -1)
1251 +    streamN = 0;
1252  
1253    /* FIXME: Should also check in vtsi/vmgi status what kind of stream it is. */
1254    return streamN;
1255 @@ -1280,9 +1281,10 @@
1256        if(link_values.data1 != 0)
1257         (vm->state).HL_BTNN_REG = link_values.data1 << 10;
1258        assert((vm->state).pgc->next_pgc_nr != 0);
1259 -      if(!set_PGCN(vm, (vm->state).pgc->next_pgc_nr))
1260 -       assert(0);
1261 -      link_values = play_PGC(vm);
1262 +      if(set_PGCN(vm, (vm->state).pgc->next_pgc_nr))
1263 +       link_values = play_PGC(vm);
1264 +      else
1265 +       link_values.command = Exit;
1266        break;
1267      case LinkPrevPGC:
1268        /* Link to Previous Program Chain */
1269 @@ -1290,9 +1292,10 @@
1270        if(link_values.data1 != 0)
1271         (vm->state).HL_BTNN_REG = link_values.data1 << 10;
1272        assert((vm->state).pgc->prev_pgc_nr != 0);
1273 -      if(!set_PGCN(vm, (vm->state).pgc->prev_pgc_nr))
1274 -       assert(0);
1275 -      link_values = play_PGC(vm);
1276 +      if(set_PGCN(vm, (vm->state).pgc->prev_pgc_nr))
1277 +       link_values = play_PGC(vm);
1278 +      else
1279 +       link_values.command = Exit;
1280        break;
1281      case LinkGoUpPGC:
1282        /* Link to GoUp Program Chain */
1283 @@ -1300,9 +1303,10 @@
1284        if(link_values.data1 != 0)
1285         (vm->state).HL_BTNN_REG = link_values.data1 << 10;
1286        assert((vm->state).pgc->goup_pgc_nr != 0);
1287 -      if(!set_PGCN(vm, (vm->state).pgc->goup_pgc_nr))
1288 -       assert(0);
1289 -      link_values = play_PGC(vm);
1290 +      if(set_PGCN(vm, (vm->state).pgc->goup_pgc_nr))
1291 +       link_values = play_PGC(vm);
1292 +      else
1293 +       link_values.command = Exit;
1294        break;
1295      case LinkTailPGC:
1296        /* Link to Tail of Program Chain */
1297 @@ -1325,7 +1329,8 @@
1298         }
1299         
1300         (vm->state).domain = VTS_DOMAIN;
1301 -       ifoOpenNewVTSI(vm, vm->dvd, (vm->state).rsm_vtsN);
1302 +       if (!ifoOpenNewVTSI(vm, vm->dvd, (vm->state).rsm_vtsN))
1303 +         assert(0);
1304         set_PGCN(vm, (vm->state).rsm_pgcN);
1305         
1306         /* These should never be set in SystemSpace and/or MenuSpace */ 
1307 @@ -1343,10 +1348,11 @@
1308           (vm->state).pgN = 1;
1309           link_values = play_PG(vm);
1310         } else { 
1311 -         /* (vm->state).pgN = ?? this gets the righ value in set_PGN() below */
1312 +         /* (vm->state).pgN = ?? this gets the right value in set_PGN() below */
1313           (vm->state).cellN = (vm->state).rsm_cellN;
1314           link_values.command = PlayThis;
1315 -         link_values.data1 = (vm->state).rsm_blockN;
1316 +         link_values.data1 = (vm->state).rsm_blockN & 0xffff;
1317 +         link_values.data2 = (vm->state).rsm_blockN >> 16;
1318           if(!set_PGN(vm)) {
1319             /* Were at the end of the PGC, should not happen for a RSM */
1320             assert(0);
1321 @@ -1403,9 +1409,10 @@
1322        /* Stop SPRM9 Timer */
1323        /* Set SPRM1 and SPRM2 */
1324        assert((vm->state).domain == VMGM_DOMAIN || (vm->state).domain == FP_DOMAIN); /* ?? */
1325 -      if(!set_TT(vm, link_values.data1))
1326 -       assert(0);
1327 -      link_values = play_PGC(vm);
1328 +      if(set_TT(vm, link_values.data1))
1329 +        link_values = play_PGC(vm);
1330 +      else
1331 +       link_values.command = Exit;
1332        break;
1333      case JumpVTS_TT:
1334        /* Jump to Title:data1 in same VTS Title Domain */
1335 @@ -1462,7 +1469,8 @@
1336           /* the normal case */
1337           assert((vm->state).domain == VMGM_DOMAIN || (vm->state).domain == FP_DOMAIN); /* ?? */
1338           (vm->state).domain = VTSM_DOMAIN;
1339 -         ifoOpenNewVTSI(vm, vm->dvd, link_values.data1);  /* Also sets (vm->state).vtsN */
1340 +         if (!ifoOpenNewVTSI(vm, vm->dvd, link_values.data1))  /* Also sets (vm->state).vtsN */
1341 +           assert(0);
1342         } else {
1343           /* This happens on some discs like "Captain Scarlet & the Mysterons" or
1344            * the German RC2 of "Anatomie" in VTSM. */
1345 @@ -1549,7 +1557,7 @@
1346  #endif
1347      
1348    }
1349 -  (vm->state).blockN = link_values.data1;
1350 +  (vm->state).blockN = link_values.data1 | (link_values.data2 << 16);
1351    return 1;
1352  }
1353  
1354 @@ -1575,8 +1583,9 @@
1355    
1356    (vm->state).domain = VTS_DOMAIN;
1357  
1358 -  if(vtsN != (vm->state).vtsN)
1359 -    ifoOpenNewVTSI(vm, vm->dvd, vtsN);  /* Also sets (vm->state).vtsN */
1360 +  if (vtsN != (vm->state).vtsN)
1361 +    if (!ifoOpenNewVTSI(vm, vm->dvd, vtsN))  /* Also sets (vm->state).vtsN */
1362 +      return 0;
1363    
1364    if ((vts_ttn < 1) || (vts_ttn > vm->vtsi->vts_ptt_srpt->nr_of_srpts) ||
1365        (part < 1) || (part > vm->vtsi->vts_ptt_srpt->title[vts_ttn - 1].nr_of_ptts) ) {
1366 @@ -1601,6 +1610,9 @@
1367  
1368  static int set_FP_PGC(vm_t *vm) {  
1369    (vm->state).domain = FP_DOMAIN;
1370 +  if (!vm->vmgi->first_play_pgc) {
1371 +    return set_PGCN(vm, 1);
1372 +  }
1373    (vm->state).pgc = vm->vmgi->first_play_pgc;
1374    (vm->state).pgcN = vm->vmgi->vmgi_mat->first_play_pgc;
1375    return 1;
1376 diff -Naur libdvdnav-0.1.10-org/src/vm/vmcmd.c libdvdnav-0.1.10/src/vm/vmcmd.c
1377 --- libdvdnav-0.1.10-org/src/vm/vmcmd.c 2004-03-03 17:50:42.000000000 +0100
1378 +++ libdvdnav-0.1.10/src/vm/vmcmd.c     2008-03-28 15:24:50.000000000 +0100
1379 @@ -1,5 +1,5 @@
1380  /*
1381 - * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort
1382 + * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort
1383   *               2002-2004 the dvdnav project
1384   * 
1385   * This file is part of libdvdnav, a DVD navigation library. It is modified
1386 @@ -18,9 +18,6 @@
1387   * You should have received a copy of the GNU General Public License
1388   * along with this program; if not, write to the Free Software
1389   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
1390 - *
1391 - * $Id: vmcmd.c,v 1.2 2004/03/03 16:50:42 mroi Exp $
1392 - *
1393   */
1394  
1395  #ifdef HAVE_CONFIG_H
1396 diff -Naur libdvdnav-0.1.10-org/src/vm/vmcmd.h libdvdnav-0.1.10/src/vm/vmcmd.h
1397 --- libdvdnav-0.1.10-org/src/vm/vmcmd.h 2004-01-11 22:43:13.000000000 +0100
1398 +++ libdvdnav-0.1.10/src/vm/vmcmd.h     2008-01-23 06:11:52.000000000 +0100
1399 @@ -1,5 +1,5 @@
1400  /*
1401 - * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort
1402 + * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort
1403   * 
1404   * This file is part of libdvdnav, a DVD navigation library. It is modified
1405   * from a file originally part of the Ogle DVD player.
1406 @@ -17,9 +17,6 @@
1407   * You should have received a copy of the GNU General Public License
1408   * along with this program; if not, write to the Free Software
1409   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
1410 - *
1411 - * $Id: vmcmd.h,v 1.1 2004/01/11 21:43:13 mroi Exp $
1412 - *
1413   */
1414  
1415  #ifndef VMCMD_H_INCLUDED
1416 diff -Naur libdvdnav-0.1.10-org/src/vm/vm.h libdvdnav-0.1.10/src/vm/vm.h
1417 --- libdvdnav-0.1.10-org/src/vm/vm.h    2004-01-11 22:43:13.000000000 +0100
1418 +++ libdvdnav-0.1.10/src/vm/vm.h        2008-01-23 06:11:52.000000000 +0100
1419 @@ -1,5 +1,5 @@
1420  /*
1421 - * Copyright (C) 2000, 2001 Håkan Hjort
1422 + * Copyright (C) 2000, 2001 Håkan Hjort
1423   * Copyright (C) 2001 Rich Wareham <richwareham@users.sourceforge.net>
1424   * 
1425   * This file is part of libdvdnav, a DVD navigation library. It is modified
1426 @@ -18,9 +18,6 @@
1427   * You should have received a copy of the GNU General Public License
1428   * along with this program; if not, write to the Free Software
1429   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
1430 - *
1431 - * $Id: vm.h,v 1.1 2004/01/11 21:43:13 mroi Exp $
1432 - *
1433   */
1434  
1435  #ifndef VM_H_INCLUDED
1436 @@ -127,7 +124,7 @@
1437  dvd_reader_t *vm_get_dvd_reader(vm_t *vm);
1438  
1439  /* Basic Handling */
1440 -void vm_start(vm_t *vm);
1441 +int  vm_start(vm_t *vm);
1442  void vm_stop(vm_t *vm);
1443  int  vm_reset(vm_t *vm, const char *dvdroot);
1444  
1445 diff -Naur libdvdnav-0.1.10-org/configure.ac libdvdnav-0.1.10/configure.ac
1446 --- libdvdnav-0.1.10-org/configure.ac   2004-06-10 23:13:02.000000000 +0200
1447 +++ libdvdnav-0.1.10/configure.ac       2008-04-19 21:29:04.000000000 +0200
1448 @@ -13,9 +13,9 @@
1449  dnl --------------------------------------------------------------
1450  dnl Making releases: DVDNAV_SUB += 1; change LT_* accordingly
1451  dnl --------------------------------------------------------------
1452 -DVDNAV_MAJOR=0
1453 +DVDNAV_MAJOR=1
1454  DVDNAV_MINOR=1
1455 -DVDNAV_SUB=10
1456 +DVDNAV_SUB=12
1457  DVDNAV_PRE=""
1458  
1459  AC_SUBST(DVDNAV_MAJOR)