Ganael LAPLANCHE | 18 Jan 11:53

[PATCHES] libdvdread and libdvdnav patches

Hi team,

First of all, thanks for your great work :)

I am the maintainer of FreeBSD ports of libdvdread and libdvdnav and
have small patches that you might be interested in, see :

For libdvdread :

*
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/multimedia/libdvdread/files/patch-configure2?rev=1.3;content-type=text%2Fplain

This first patch adds support for libdatadir option, fixes incdir option
and bigendian detection. Some chunks are FreeBSD-only an can be skipped
(PREFIX comment, TMPD modification).

*
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/multimedia/libdvdread/files/patch-src.md5.c?rev=1.1;content-type=text%2Fplain

This patch uses config.h instead of trying to re-detect endianness.

For libdvdnav :

*
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/multimedia/libdvdnav/files/patch-configure2?rev=1.3;content-type=text%2Fplain

This patch adds support for libdatadir option and bigendian detection.
Some chunks are still FreeBSD-only an can be skipped (PREFIX comment, TMPD).

Best regards,
(Continue reading)

Jorgen Lundman | 13 Jan 06:40
Gravatar

libdvdread: UDF rework


Hello list,

I prefer to keep libdvdread as a library that can read all versions of UDF 
filesystem (Up to 2.60) and ISO files. I find it very unattractive to use 
multiple libraries, one to test if it is a "VIDEO_TS" style UDF, and if not, use 
a whole different library to handle this type of UDF device/file. (which also 
interfaces with libdvdcss and/or libaacs)

I decided to take a look at libdvdread again, with regards to reading generic 
UDF devices and ISO images. libdvdread already could handle DVD UDF levels, and 
I already did some work to enable higher UDF levels like that of blurays.

But it generally mostly worked for images created with ImgBurn, and not always 
for retail blurays or generic UDF. (Linux mkudffs or OsX Newfs_udf).

So, with that in mind I made the following changes:

* Proper LogVolume parsing, and scan the defined partitions
   + Handle Sparing Table
   + Handle Metadata partition; main, mirror and bitmap locations.

* Handle ExtFileInfo 250,251,252 (Metadata; Main file, mirror file and bitmap file)

* Fix math to find logic block for FSD, based on FSD for metadata not partition 
start, and/or influenced by Metadata entry. It no longer "loops" looking/hoping 
for the right TagID.

* Fixed "ICBTag.flags&7 = 3" type, "file content data" is stored at AD! (In the 
same block)
(Continue reading)

Honza Horak | 10 Jan 12:26
Picon
Favicon

Assert failed when using libdvdread in vlc

Hi,

there is a low priority bug report against libdvdread at:
http://bugzilla.redhat.com/770720

I'm not able to reproduce it myself, but the original reporter is able 
to reproduce it every time using these steps:
1. Create a DVD on Toshiba XS32
2. Create image on hard disk with K3b
3. Play image with vlc

Actual results:
vlc gives "libdvdread: CHECK_VALUE failed in 
/builddir/build/BUILD/libdvdread-4.1.4/src/nav_read.c:264"

Expected results:
No messages

Cheers,

Honza
Bryce Harrington | 16 Dec 09:13
Favicon
Gravatar

[PATCH] Fix out of array pointer access

This patch fixes a segmentation fault hit when reading the DVD 'The
Express'.  It prevents a read/write beyond end of an array due to using
a length value taken from the DVD, which can exceed the allocated size.

https://bugs.launchpad.net/ubuntu/+source/libdvdread/+bug/894170

The patch was originally written by rickyrockrat (sorry, I don't have
his email address) for 4.1.3.  I got the DVD and reproduced the segfault
using 4.2.0 and verified the patch stops the segfault from happening.
We're not confident this is the best fix though, so are posting it here
for review.

Signed-off-by:  Bryce Harrington <bryce@...>

diff -Nrup libdvdread-4.2.0//src/ifo_read.c libdvdread-4.2.0-working//src/ifo_read.c
--- libdvdread-4.2.0//src/ifo_read.c	2011-12-13 20:24:16.000000000 -0800
+++ libdvdread-4.2.0-working//src/ifo_read.c	2011-12-13 21:21:53.915978130 -0800
@@ -1082,6 +1082,12 @@ int ifoRead_TT_SRPT(ifo_handle_t *ifofil
     return 0;
   }

+  if(tt_srpt->nr_of_srpts>info_length/sizeof(title_info_t)){
+    fprintf(stderr,"libdvdread: data mismatch: info_length (%ld)!= nr_of_srpts (%d). Truncating.\n",
+            info_length/sizeof(title_info_t),tt_srpt->nr_of_srpts);
+    tt_srpt->nr_of_srpts=info_length/sizeof(title_info_t);
+  }
+
   for(i =  0; i < tt_srpt->nr_of_srpts; i++) {
     B2N_16(tt_srpt->title[i].nr_of_ptts);
     B2N_16(tt_srpt->title[i].parental_id);
(Continue reading)

Roger Pack | 1 Dec 19:18
Picon

cross/mingw compilation (was assertion failure with certain DVD's)

>> $./configure2
>> ./configure2: line 95: cd: /usr/local/: No such file or directory #
>> needs to be run in bash I believe
>
> Nope, you need to set the install prefix with --prefix=blabla

Sweet that fixed it, as long as the prefix exists, otherwise same
error message different path :)

>> Checking if we're big-endian... ./configure2: line 113: mktemp: command not found

This meant I didn't have msys installed, only mingw (my bad).

>> Done, type 'make install' to build and install

>> (appears to set HAVE_DLFCN_H in error)
>
> Without using autotools, dlfcn.h presence is not detected

Is there a way to use autotools with libdvdread?  I'm a bit lost, as
is evident.  though I can work around it for now.  This actually makes
me wonder how anybody is compiling it for their windows distros today.
 I know mplayer just uses the src directory and its own configs (which
work), dunno about VLC/others.  It seems like both msys and cross
compiling don't work, or can somebody give me an example of how they
do work, somehow?

> ./msvc/config.h:#define HAVE_DLFCN_H 1
>
> And it is assumed to exist (is this file made for Visual Studio?)
(Continue reading)

Roger Pack | 30 Nov 19:56
Picon

[PATCH] use newer dll name

For some reason on windows the dll name these days is almost always
libdvdcss-2.dll
instead of
libdvdcss.dll
(gstreamer, xbmc, etc.)
This patch seems to work, and would make it to match, which seems
better from my vantage.
-roger-
Attachment (use_newer_dll_name.diff): application/octet-stream, 389 bytes
_______________________________________________
DVDnav-discuss mailing list
DVDnav-discuss@...
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
Roger Pack | 30 Nov 19:01
Picon

remap_loadmap purpose

I always get this message and was wondering if it's possible to quiet it a bit:
libdvdnav: Unable to find map file 'C:\Users\packrd/.dvdnav/.map'
What is the purpose of remap_loadmap? (the .h file doesn't seem to tell much)
Thanks.
-roger-
Roger Pack | 30 Nov 18:41
Picon

assertion failure with certain DVD's

Hello all.

I get the following assertion playing the "Tangled" DVD with mplayer
and an up to date libdvdnav, on windows:

Assertion failed: (vm->state).pgc->cell_playback[(vm->state).cellN -
1].block_mode != 0, file libdvdnav/vm/vm.c, line 1141

The weird part about this is that in mac/linux, I get this error
message, and no failed assertion, and playing continues:
libdvdnav: Invalid angle block

I'd be happy to send more information, or a (legal) DVD to keep, for
any developer that would like to tackle it.

It appears that it happens with a few other (Disney?) DVD's, as well:
http://lists.mplayerhq.hu/pipermail/mplayer-users/2008-December/075458.html
https://trac.handbrake.fr/ticket/125
https://forum.handbrake.fr/viewtopic.php?f=11&t=14189

So I'm guessing it's a libdvdnav bug.
As a note, in VLC on windows, this causes playback to "loop" over -
cellN=2 over and over, though it doesn't crash--I'm guessing it just
swallows the assertion failure, or the failure isn't enabled with that
build.

Thanks.
-roger-
gnosygnu | 30 Nov 06:31
Picon
Gravatar

[PATCH] "dvdnav_jump_to_sector" as an alternative to "dvdnav_time_search" (REV 5: combined args to structs)

This revision includes the following changes:

1) combined multiple arguments into structures (See dvdnav_pos_data_t,
dvdnav_cell_data_t, dvdnav_jump_args_t)
2) changed multi-line statements to remove leading commas
3) removed tabs/trailing whitespace
4) replaced "discontinuity tmap indexes" approach with simpler "use
entry sector of current cell" to handle DVDs with initial dummy cells.

Thanks to all who have read through the patch and/or offered comments.

As far as I know, there are no other known pending changes/requests. I
am hoping that this patch is at a near-final state.

Please let me know what else should be done to get this patch accepted.

Thanks.
Attachment (jump_to_time.rev5.patch): application/octet-stream, 19 KiB
_______________________________________________
DVDnav-discuss mailing list
DVDnav-discuss@...
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
Rafaël Carré | 25 Nov 18:48
Favicon

[PATCH] Link directly with libdvdcss

Hi,

I'm sending a patch we've been using in VLC for some years on our
mingw32 and darwin binaries.

It adds --enable-libdvdcss (off by default) to link directly to dvdcss 
instead of using dlopen()

--- dvdread/misc/dvdread.pc.in.orig	2011-11-25 11:13:16.573585109 -0500
+++ dvdread/misc/dvdread.pc.in	2011-11-25 11:01:31.390088283 -0500
@@ -8,4 +8,4 @@
 Version: @VERSION@

 Cflags: -I${includedir}
-Libs: -L${libdir} -ldvdread
+Libs: -L${libdir} -ldvdread @CSS_LIBS@
--- dvdread/src/Makefile.am.orig	2011-11-25 11:20:16.287666356 -0500
+++ dvdread/src/Makefile.am	2011-11-25 11:20:24.147705328 -0500
@@ -10,7 +10,7 @@
 	dvd_input.c dvd_udf.c md5.c nav_print.c ifo_print.c bitreader.c \
 	bswap.h dvd_input.h dvdread_internal.h dvd_udf.h md5.h bitreader.h

-libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS)
+libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS) @CSS_LIBS@

 libdvdread_la_LDFLAGS = -version-info
$(DVDREAD_LT_CURRENT):$(DVDREAD_LT_REVISION):$(DVDREAD_LT_AGE) \
 	-export-symbols-regex "(^dvd.*|^nav.*|^ifo.*|^DVD.*|^UDF.*)"
--- dvdread/configure.ac.orig	2011-11-25 10:59:00.953342325 -0500
+++ dvdread/configure.ac	2011-11-25 11:21:26.732015667 -0500
(Continue reading)

Roger Pack | 24 Nov 02:16
Picon

no VTS_TMAPT ??

As a side note, in VLC starting basically any "Disney DVD's" causes
this message to be output, about 5 times:

"Please send bug report - no VTS_TMAPT ??"

Full output:
https://gist.github.com/1390408
Reporting as requested :)

-Roger-

Gmane