[DVDnav-discuss] patched libdvdread in dvdnav

Nico Sabbi Nicola.Sabbi at poste.it
Wed May 28 12:01:43 CEST 2008


On Monday 26 May 2008 10:39:24 Nico Sabbi wrote:
> On Monday 26 May 2008 10:32:50 Alexander Roalter wrote:
> > Something beside: the current version (r1041) still has the
> > problems with a) the language not being recognized anymore and b)
> > the aspect ratio not being recognized. I reverted back to r997
> > for everyday use, you mentioned something along the lines of some
> > changes in the structures needed in either mplayer or dvdnav.
>
> yes: the directory dvdread/ in mplayer is being used to include
> the wrong headers.
> I still have to rename it
> _______________________________________________
> DVDnav-discuss mailing list
> DVDnav-discuss at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss


applied yesterday, but with a significant change:

+int DVDFileSeekForce (dvd_file_t *dvd_file, int offset, int 
force_size)
+{
+    /* Check arguments. */
+    if( dvd_file == NULL || offset < 0 )

^^^^^^^^^^^^^^^^^^^^^^^^^^^
here the check is offset <= 0 otherwise below offset-1 will become 
something totally broken

+    return -1;
+
+    if( dvd_file->dvd->isImageFile ) {
+        if( force_size < 0 )
+            force_size = (offset - 1) / DVD_VIDEO_LB_LEN + 1;
+        if( dvd_file->filesize < force_size ) {
+            dvd_file->filesize = force_size;
+            fprintf(stderr, "libdvdread: Ignored UDF provided size of 
file.\n");
+        }
+    }
+
+    if( offset > dvd_file->filesize * DVD_VIDEO_LB_LEN ) {
+        return -1;
+    }
+    dvd_file->seek_pos = (uint32_t) offset;
+    return offset;
+}
+



More information about the DVDnav-discuss mailing list