[vlc-devel] [PATCH 1/7] player: Only restore states for videos

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Jan 8 15:17:04 CET 2020


On Wed, Jan 8, 2020, at 3:08 PM, Rémi Denis-Courmont wrote:
> This seems rather arbitrary and I failed to find a rationale in the 
> patch description.
> 
> Le 6 janvier 2020 21:38:44 GMT+09:00, "Hugo Beauzée-Luyssen" 
> <hugo at beauzee.fr> a écrit :  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;

It is, indeed.
There are plan to add a better support in a not so distant future (basically bringing back the "always resume, never resume, ask" setting from previous versions, and possibly add another variant to allow (long?) audio files to be resumed from where they were left off.
But basically for now, the main rationale is that it sucks to always resume all media, especially for short audio files.

I'll update the commit log


-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list