[MPlayer-dev-eng] [PATCH] fencepost error in stream_dvdnav.c

Mike Castle dalgoda+mplayer at gmail.com
Wed Feb 16 03:11:21 CET 2011


Separating out a previous larger patch.

in libdvdnav, chapter references are 1-based, not 0-based.

Before:
$ ./mplayer -dvd-device $dvd -identify -frames 0 -vo null -ao null
dvd:// dvdnav:// 2> /dev/null | grep 'ID_DVD.*LENGTH'
ID_DVD_TITLE_5_LENGTH=0.500
ID_DVD_TITLE_1_LENGTH=2708.266
ID_DVD_TITLE_2_LENGTH=2708.600
ID_DVD_TITLE_3_LENGTH=2710.266
ID_DVD_TITLE_4_LENGTH=2708.266
ID_DVD_TITLE_1_LENGTH=2644.466
ID_DVD_TITLE_2_LENGTH=2627.533
ID_DVD_TITLE_3_LENGTH=2710.266
ID_DVD_TITLE_4_LENGTH=2708.266

After:
$ ./mplayer -dvd-device $dvd -identify -frames 0 -vo null -ao null
dvd:// dvdnav:// 2> /dev/null | grep 'ID_DVD.*LENGTH'
ID_DVD_TITLE_5_LENGTH=0.500
ID_DVD_TITLE_1_LENGTH=2708.266
ID_DVD_TITLE_2_LENGTH=2708.600
ID_DVD_TITLE_3_LENGTH=2710.266
ID_DVD_TITLE_4_LENGTH=2708.266
ID_DVD_TITLE_1_LENGTH=2644.466
ID_DVD_TITLE_2_LENGTH=2627.533
ID_DVD_TITLE_3_LENGTH=2710.266
ID_DVD_TITLE_4_LENGTH=2708.266
ID_DVD_TITLE_5_LENGTH=0.500


stream_dvd.c deals with the similar problem by using i+1 all over the place

mrc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fencepost_error.patch
Type: text/x-patch
Size: 423 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110215/4f8b0d3a/attachment.bin>


More information about the MPlayer-dev-eng mailing list