Commit fbd8c12f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Dvdread: avoid a nasty crash.

parent 4b80f777
......@@ -801,6 +801,10 @@ static int DvdReadSetArea( demux_t *p_demux, int i_title, int i_chapter,
/* Title position inside the selected vts */
p_sys->i_ttn = p_vmg->tt_srpt->title[i_title].vts_ttn;
msg_Dbg( p_demux, "%i", p_sys->i_ttn );
if( p_sys->i_ttn < 1 )
return VLC_EGENERIC; /* Couldn't set title */
/* Find title start/end */
pgc_id = p_vts->vts_ptt_srpt->title[p_sys->i_ttn - 1].ptt[0].pgcn;
pgn = p_vts->vts_ptt_srpt->title[p_sys->i_ttn - 1].ptt[0].pgn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment