[vlc-commits] [Git][videolan/vlc][master] 3 commits: access: set all callback fields in ACCESS_SET_CALLBACKS

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Feb 4 15:38:49 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
721c4bc5 by Steve Lhomme at 2023-02-04T15:22:27+00:00
access: set all callback fields in ACCESS_SET_CALLBACKS

- - - - -
1a130d94 by Steve Lhomme at 2023-02-04T15:22:27+00:00
demux: set all callback fields in DEMUX_INIT_COMMON

- - - - -
95611d78 by Steve Lhomme at 2023-02-04T15:22:27+00:00
input: reset normal time on error

As the comment says, an error should be considered as VLC_TICK_0.
Since the value may not be constant we should reset it when needed.

- - - - -


3 changed files:

- include/vlc_access.h
- include/vlc_demux.h
- src/input/input.c


Changes:

=====================================
include/vlc_access.h
=====================================
@@ -71,6 +71,7 @@ VLC_API int access_vaDirectoryControlHelper( stream_t *p_access, int i_query, va
         p_access->pf_block = (block); \
         p_access->pf_control = (control); \
         p_access->pf_seek = (seek); \
+        p_access->pf_demux = NULL; \
     } while(0)
 
 /**


=====================================
include/vlc_demux.h
=====================================
@@ -419,6 +419,9 @@ VLC_API void demux_PacketizerDestroy( decoder_t *p_packetizer );
 
 /* */
 #define DEMUX_INIT_COMMON() do {            \
+    p_demux->pf_read = NULL;                \
+    p_demux->pf_block = NULL;               \
+    p_demux->pf_seek = NULL;                \
     p_demux->pf_control = Control;          \
     p_demux->pf_demux = Demux;              \
     p_demux->p_sys = calloc( 1, sizeof( demux_sys_t ) ); \


=====================================
src/input/input.c
=====================================
@@ -588,7 +588,8 @@ static void MainLoopStatistics( input_thread_t *p_input )
 
     /* In case of failure (not implemented or in case of seek), use the last
      * normal_time value (that is VLC_TICK_0 by default). */
-    demux_Control( priv->master->p_demux, DEMUX_GET_NORMAL_TIME, &priv->normal_time );
+    if (demux_Control( priv->master->p_demux, DEMUX_GET_NORMAL_TIME, &priv->normal_time ) != VLC_SUCCESS)
+        priv->normal_time = VLC_TICK_0;
 
     es_out_SetTimes( priv->p_es_out, f_position, i_time, priv->normal_time,
                      i_length );



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/175877c0a1d2195d4c02ab2718a99f8a29024352...95611d782be30ade707512da2c879f23520b54cd

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/175877c0a1d2195d4c02ab2718a99f8a29024352...95611d782be30ade707512da2c879f23520b54cd
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list