[vlc-commits] player: Only restore states for videos

Hugo Beauzée-Luyssen git at videolan.org
Thu Jan 9 16:54:42 CET 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Nov 26 10:32:04 2019 +0100| [e48544cf4bd6b5a098c93e2cf97f5d0191df05dd] | committer: Hugo Beauzée-Luyssen

player: Only restore states for videos

While this is still not optimal, we don't want to force a resume for
short audio files.
Support for the old "always resume/never resume/ask the user" will come
in a later patch.

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

 src/player/medialib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/player/medialib.c b/src/player/medialib.c
index 35cce91f2c..1d2665c17c 100644
--- a/src/player/medialib.c
+++ b/src/player/medialib.c
@@ -37,7 +37,7 @@ vlc_player_input_RestoreMlStates(struct vlc_player_input* input,
     if (!ml)
         return;
     vlc_ml_media_t* media = vlc_ml_get_media_by_mrl( ml, item->psz_uri);
-    if (!media)
+    if (!media || media->i_type != VLC_ML_MEDIA_TYPE_VIDEO)
         return;
     if (vlc_ml_media_get_all_playback_pref(ml, media->i_id, &input->ml.states) != VLC_SUCCESS)
         return;



More information about the vlc-commits mailing list