[MPlayer-dev-eng] Segfault while accessing a DVD, try to acces an invalid pointer

Guillaume LECERF foxcore at gmail.com
Wed May 16 22:52:24 CEST 2007


Hi all,

While playing with mplayer and the dvdnav patch, I made my tests with
a snowboard dvd, that's crashed mplayer. I can't say that it's my dvd
disc fault, because I don't have any other dvd to test with, but I
investigated further :
Here is the gdb dump :

Reading disc structure, please wait...
ID_DVD_TITLES=7
ID_DVD_TITLE_1_CHAPTERS=1
ID_DVD_TITLE_1_ANGLES=1
ID_DVD_TITLE_2_CHAPTERS=1
ID_DVD_TITLE_2_ANGLES=1
ID_DVD_TITLE_3_CHAPTERS=1
ID_DVD_TITLE_3_ANGLES=1
ID_DVD_TITLE_4_CHAPTERS=1
ID_DVD_TITLE_4_ANGLES=1
ID_DVD_TITLE_5_CHAPTERS=1
ID_DVD_TITLE_5_ANGLES=1
ID_DVD_TITLE_6_CHAPTERS=1
ID_DVD_TITLE_6_ANGLES=1
ID_DVD_TITLE_7_CHAPTERS=1
ID_DVD_TITLE_7_ANGLES=1
ID_DVD_TITLE_1_LENGTH=100.120
ID_DVD_TITLE_2_LENGTH=1097.720
ID_DVD_TITLE_3_LENGTH=318.920
ID_DVD_TITLE_4_LENGTH=243.880
ID_DVD_TITLE_5_LENGTH=80.280
ID_DVD_TITLE_6_LENGTH=109.240
ID_DVD_TITLE_7_LENGTH=68.520
ID_DVD_DISC_ID=4C823A26C883D6CCADAE03D1986FEAB0
There are 7 titles on this DVD.
ID_DVD_CURRENT_TITLE=1
There are 1 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
audio stream: 0 format: lpcm (stereo) language:  aid: 160.
ID_AUDIO_ID=160
number of audio channels on disk: 1.
number of subtitles on disk: 0

Program received signal SIGSEGV, Segmentation fault.
open_s (stream=0x885e9b8, mode=0, opts=0x885a868,
file_format=0x866a748) at stream_dvd.c:1200
1200        d->cur_cell = d->cur_pgc->program_map[pgn-1] - 1; // start
playback here
(gdb) bt
#0  open_s (stream=0x885e9b8, mode=0, opts=0x885a868,
file_format=0x866a748) at stream_dvd.c:1200
#1  0x0817e137 in open_stream_plugin (sinfo=0x86a0400,
filename=0x881a680 "dvd://", mode=0, options=0x881a686,
file_format=0x866a748, ret=0xbf9cc568) at stream.c:179
#2  0x0817e3b6 in open_stream_full (filename=0x881a680 "dvd://",
mode=0, options=0x0, file_format=0x866a748) at stream.c:236
#3  0x0817dac2 in open_stream (filename=0x0, options=0x0,
file_format=0x886514c) at open.c:46
#4  0x0807d242 in main (argc=2, argv=0xbf9cd7b4) at mplayer.c:3322
(gdb) l
1195         */
1196        pgc_id =
vts_file->vts_ptt_srpt->title[ttn].ptt[dvd_chapter-1].pgcn; // local
1197        pgn =
vts_file->vts_ptt_srpt->title[ttn].ptt[dvd_chapter-1].pgn; // local
1198        d->cur_pgc_idx = pgc_id-1;
1199        d->cur_pgc = vts_file->vts_pgcit->pgci_srp[pgc_id-1].pgc;
1200        d->cur_cell = d->cur_pgc->program_map[pgn-1] - 1; // start
playback here
1201        d->packs_left=-1;      // for Navi stuff
1202        d->angle_seek=0;
1203        /* XXX dvd_last_chapter is in the range 1..nr_of_ptts */
1204        if(dvd_last_chapter > 0 && dvd_last_chapter <
tt_srpt->title[dvd_title].nr_of_ptts) {


Actually pgn == 0, and then d->cur_pgc->program_map[pgn-1] is an
invalid pointer.

Can you please give me your advices on this one ?

-- 
Guillaume LECERF
GeeXboX developer



More information about the MPlayer-dev-eng mailing list