Commit e5e9c944 authored by Gildas Bazin's avatar Gildas Bazin

* modules/access/dvdnav.c,dvdread.c: don't crash if the DVD can't be decrypted/read.

parent e46cef82
......@@ -292,7 +292,10 @@ static int Open( vlc_object_t *p_this )
if( dvdnav_title_play( p_sys->dvdnav, 1 ) != DVDNAV_STATUS_OK )
{
msg_Warn( p_demux, "cannot set title" );
msg_Err( p_demux, "cannot set title (can't decrypt DVD?)" );
dvdnav_close( p_sys->dvdnav );
free( p_sys );
return VLC_EGENERIC;
}
if( dvdnav_menu_call( p_sys->dvdnav, DVD_MENU_Title ) !=
......
......@@ -263,7 +263,13 @@ static int Open( vlc_object_t *p_this )
p_sys->i_angle = val.i_int > 0 ? val.i_int : 1;
DemuxTitles( p_demux, &p_sys->i_angle );
DvdReadSetArea( p_demux, 0, 0, p_sys->i_angle );
if( DvdReadSetArea( p_demux, 0, 0, p_sys->i_angle ) != VLC_SUCCESS )
{
Close( p_this );
msg_Err( p_demux, "DvdReadSetArea(0,0,%i) failed (can't decrypt DVD?)",
p_sys->i_angle );
return VLC_EGENERIC;
}
/* Update default_pts to a suitable value for dvdread access */
var_Create( p_demux, "dvdread-caching",
......
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