[vlc-commits] dvdnav: remove semi-broken seek on failure, fix warning
Rémi Denis-Courmont
git at videolan.org
Sun Jul 9 15:44:33 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 9 16:43:40 2017 +0300| [686b01a032e767ebd33d8a21bca65317702ed942] | committer: Rémi Denis-Courmont
dvdnav: remove semi-broken seek on failure, fix warning
This was not handling the case of error when seeking due to a previous
error (hence the warning, in fact).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=686b01a032e767ebd33d8a21bca65317702ed942
---
modules/access/dvdnav.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 7d8ac58efd..c6e5761a81 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -453,8 +453,6 @@ static int DemuxOpen ( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t*)p_this;
dvdnav_t *p_dvdnav = NULL;
- int i_ret = VLC_EGENERIC;
- int64_t i_init_pos;
bool forced = false, b_seekable = false;
if( p_demux->psz_demux != NULL
@@ -468,11 +466,9 @@ static int DemuxOpen ( vlc_object_t *p_this )
if( !b_seekable )
return VLC_EGENERIC;
- i_init_pos = vlc_stream_Tell( p_demux->s );
-
/* Try some simple probing to avoid going through dvdnav_open too often */
if( !forced && StreamProbeDVD( p_demux->s ) != VLC_SUCCESS )
- goto bailout;
+ return VLC_EGENERIC;
static dvdnav_stream_cb stream_cb =
{
@@ -486,16 +482,12 @@ static int DemuxOpen ( vlc_object_t *p_this )
&stream_cb ) != DVDNAV_STATUS_OK )
{
msg_Warn( p_demux, "cannot open DVD with open_stream" );
- goto bailout;
+ return VLC_EGENERIC;
}
- i_ret = CommonOpen( p_this, p_dvdnav, false );
+ int i_ret = CommonOpen( p_this, p_dvdnav, false );
if( i_ret != VLC_SUCCESS )
dvdnav_close( p_dvdnav );
-
-bailout:
- if( i_ret != VLC_SUCCESS )
- vlc_stream_Seek( p_demux->s, i_init_pos );
return i_ret;
}
#endif
More information about the vlc-commits
mailing list