[vlc-commits] lib: fix track count in get_track_from_id()

Pascal Souchet git at videolan.org
Fri Jul 3 20:23:52 CEST 2020


vlc | branch: master | Pascal Souchet <psplob at gmail.com> | Thu Jul  2 18:32:55 2020 +0200| [53edb082875da710513ecd37c5f1c9f5e6bb515d] | committer: Thomas Guillem

lib: fix track count in get_track_from_id()

Track counting always selected "video" type track list despite category choice
(audio/spu).

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 lib/media_player.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/media_player.c b/lib/media_player.c
index 2f390468c4..9c7a7a76aa 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1871,7 +1871,7 @@ libvlc_media_player_get_track_from_id( libvlc_media_player_t *p_mi,
     for (size_t i = 0; i < ARRAY_SIZE(cats); ++i)
     {
         enum es_format_category_e cat = cats[i];
-        size_t count = vlc_player_GetTrackCount(player, VIDEO_ES);
+        size_t count = vlc_player_GetTrackCount(player, cat);
 
         for (size_t j = 0; j < count; ++j)
         {



More information about the vlc-commits mailing list