[vlc-commits] mp4: add DEMUX_GET_SEEKPOINT

Rémi Denis-Courmont git at videolan.org
Sun Dec 3 13:27:26 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec  3 12:14:15 2017 +0200| [2743244eb6a2fb06fa4f0635b3f5b5f095a3cbc1] | committer: Rémi Denis-Courmont

mp4: add DEMUX_GET_SEEKPOINT

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

 modules/demux/mp4/mp4.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index b83157d098..a5ac40ba75 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -108,6 +108,7 @@ struct demux_sys_t
     MP4_Box_t    *p_tref_chap;
 
     /* */
+    int          i_seekpoint;
     input_title_t *p_title;
     vlc_meta_t    *p_meta;
 
@@ -1404,9 +1405,9 @@ static void MP4_UpdateSeekpoint( demux_t *p_demux, int64_t i_time )
     }
     i--;
 
-    if( i != p_demux->info.i_seekpoint && i >= 0 )
+    if( i != p_sys->i_seekpoint && i >= 0 )
     {
-        p_demux->info.i_seekpoint = i;
+        p_sys->i_seekpoint = i;
         p_demux->info.i_update |= INPUT_UPDATE_SEEKPOINT;
     }
 }
@@ -1859,6 +1860,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             }
             return VLC_SUCCESS;
 
+        case DEMUX_GET_SEEKPOINT:
+            *va_arg( args, int * ) = p_sys->i_seekpoint;
+            return VLC_SUCCESS;
+
         case DEMUX_SET_POSITION:
             f = va_arg( args, double );
             b = va_arg( args, int );



More information about the vlc-commits mailing list