[vlc-devel] commit: Dvdread: avoid a nasty crash. (Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Sep 1 16:38:27 CEST 2008


vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Mon Sep  1 07:41:19 2008 -0700| [fbd8c12f605fa4109dfe8165ec4a69487ae59eef] | committer: Jean-Baptiste Kempf 

Dvdread: avoid a nasty crash.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fbd8c12f605fa4109dfe8165ec4a69487ae59eef
---

 modules/access/dvdread.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index 48671c5..9f13708 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -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;




More information about the vlc-devel mailing list