[vlc-commits] sid: add DEMUX_GET_TITLE

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


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

sid: add DEMUX_GET_TITLE

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

 modules/demux/sid.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/demux/sid.cpp b/modules/demux/sid.cpp
index 12a874f6a3..7e156e5452 100644
--- a/modules/demux/sid.cpp
+++ b/modules/demux/sid.cpp
@@ -69,6 +69,8 @@ struct demux_sys_t
     int block_size;
     es_out_id_t *es;
     date_t pts;
+
+    int last_title;
 };
 
 
@@ -276,12 +278,16 @@ static int Control (demux_t *demux, int query, va_list args)
             if (!result)
                 return  VLC_EGENERIC;
 
-            demux->info.i_title = i_idx;
+            sys->last_title = i_idx;
             demux->info.i_update = INPUT_UPDATE_TITLE;
             msg_Dbg( demux, "set song %i", i_idx);
 
             return VLC_SUCCESS;
         }
+
+        case DEMUX_GET_TITLE:
+            *va_arg(args, int *) = sys->last_title;
+            return VLC_SUCCESS;
     }
 
     return VLC_EGENERIC;



More information about the vlc-commits mailing list