[vlc-commits] access: dvdread: return seek failure to control

Francois Cartegnie git at videolan.org
Fri Feb 28 15:28:43 CET 2020


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb  7 11:36:04 2020 +0100| [99302e3ea999532f6ff548e1a1ce43632f1f74cc] | committer: Francois Cartegnie

access: dvdread: return seek failure to control

(cherry picked from commit 7aac6bbaf430d1f59bd1c9991c71548fb6d39828)

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

 modules/access/dvdread.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index 9d372b5a36..aa2fb575f8 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -153,7 +153,7 @@ static void DemuxTitles( demux_t *, int * );
 static void ESNew( demux_t *, int, int );
 
 static int  DvdReadSetArea  ( demux_t *, int, int, int );
-static void DvdReadSeek     ( demux_t *, int );
+static int  DvdReadSeek     ( demux_t *, int );
 static void DvdReadHandleDSI( demux_t *, uint8_t * );
 static void DvdReadFindCell ( demux_t * );
 
@@ -368,9 +368,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         {
             f = va_arg( args, double );
 
-            DvdReadSeek( p_demux, f * p_sys->i_title_blocks );
-
-            return VLC_SUCCESS;
+            return DvdReadSeek( p_demux, f * p_sys->i_title_blocks );
         }
         case DEMUX_GET_TIME:
             pi64 = va_arg( args, int64_t * );
@@ -1079,7 +1077,7 @@ static int DvdReadSetArea( demux_t *p_demux, int i_title, int i_chapter,
  * This one is used by the input and translate chronological position from
  * input to logical position on the device.
  *****************************************************************************/
-static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
+static int DvdReadSeek( demux_t *p_demux, int i_block_offset )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
     int i_chapter = 0;
@@ -1103,7 +1101,7 @@ static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
     if( i_cell > p_sys->i_title_end_cell )
     {
         msg_Err( p_demux, "couldn't find cell for block %i", i_block_offset );
-        return;
+        return VLC_EGENERIC;
     }
     i_block += p_pgc->cell_playback[i_cell].first_sector;
     p_sys->i_title_offset = i_block_offset;
@@ -1176,7 +1174,7 @@ static void DvdReadSeek( demux_t *p_demux, int i_block_offset )
 #undef p_vts
 #undef p_pgc
 
-    return;
+    return VLC_SUCCESS;
 }
 
 /*****************************************************************************



More information about the vlc-commits mailing list