[vlc-commits] [Git][videolan/vlc][master] player: fix vlc_player_Start() without effect

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sat Jan 6 11:27:08 UTC 2024



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
97325b0f by Thomas Guillem at 2024-01-06T10:02:32+00:00
player: fix vlc_player_Start() without effect

vlc_player_Start() could have 0 effects when the input was being deleted
while the user requested to play it again.

- - - - -


1 changed file:

- src/player/player.c


Changes:

=====================================
src/player/player.c
=====================================
@@ -1156,6 +1156,17 @@ vlc_player_Start(vlc_player_t *player)
             player->started = true;
             return VLC_SUCCESS;
         }
+        else if (unlikely(player->media != NULL))
+        {
+            /* The current media is being stopped while the user requested to
+             * play it again. Tell the thread to play the same media when
+             * ready. */
+            player->started = true;
+            player->next_media = input_item_Hold(player->media);
+            player->releasing_media = false;
+            player->next_media_requested = true;
+            return VLC_SUCCESS;
+        }
         else
             return VLC_EGENERIC;
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/97325b0f157af414028b1f2ed0a2551f75c5d8b2

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/97325b0f157af414028b1f2ed0a2551f75c5d8b2
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