[MPlayer-users] chapter list bug
Jared Breland
list-mplayer at legroom.net
Sat May 26 21:25:03 CEST 2007
I took a stab at fixing this, and as far as I can tell I was correct about
the off-by-one error. In stream_dvd.c, line 617:
for(i=0; i<pgc->nr_of_programs-1; i++)
That will effectively stop the loop at 2 elements prior to the end. I'm
pretty sure you'd want to stop it at only one element from the end. Either
of these would work:
for(i=0; i<pgc->nr_of_programs; i++)
for(i=0; i<=pgc->nr_of_programs-1; i++)
I'm attaching a patch that fixed the issue, at least on my system. I'd
greatly appreciate any feedback concerning confirmation of the issue or
acceptance of the patch. I'm writing a DVD audio ripping script right now
that relies on mplayer, and I need to know whether this will be fixed before
I release it. :-)
Oh, and I realize that the MPlayer version info I provided below isn't very
helpful. I appear to be using the CVS version from 03/21/2007, based on
filename of the archive. This is the current stable package for amd64
provided by Gentoo.
Thanks again.
--
Jared Breland
jbreland at legroom.net
http://www.legroom.net/
On 05/26/07 13:27, Jared Breland wrote:
> I believe I've found a bug in mplayer. I'm running the following command to
> get information about a DVD:
>
> mplayer dvd://1 -dvd-device /dev/dvd -identify -novideo -nosound
>
> The output of the command includes the number of chapters in the title, as
> well as a list of chapter start times, as can be seen here:
>
> ID_DVD_TITLE_1_CHAPTERS=14
> CHAPTERS: 00:00:00,00:03:13,00:07:24,00:13:33,00:18:32,00:24:02,
> 00:29:55,00:36:53,00:40:16,00:45:00,00:51:36,01:00:07,01:04:30,
>
> That CHAPTERS list is supposed to be all on one line, but I broke it up for
> e-mail formatting. As you can see, there are 14 titles on the DVD, but the
> CHAPTERS list only includes the start times of 13 chapters. This
> corresponds correctly to the first 13 chapters, but the start time of
> chapter 14 is missing. It begins at 01:09:57, which I know from manually
> reviewing the disc, but I cannot find any reference to that in the mplayer
> output.
>
> This appears to be a simple off-by-one logic bug. Can anyone confirm?
>
> For reference, here's my system info:
> MPlayer dev-SVN-rUNKNOWN-4.1.1
> Gentoo Base System release 1.12.9
> Linux blackdog 2.6.20-gentoo-r8 #4 SMP PREEMPT Fri May 18 20:06:01 CDT 2007
> x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux
> /lib/libc.so.6 -> libc-2.5.so
> gcc version 4.1.2
> GNU ld version 2.16.1
> GNU assembler 2.16.1
> DVD Model: Samsung (TSSTcorp) D/DVDW SH-S183L
>
> Thanks,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stream_dvd.c.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20070526/6a23c7e0/attachment.txt>
More information about the MPlayer-users
mailing list