[MPlayer-cvslog] r38105 - in trunk/gui: interface.c interface.h ui/actions.c
ib
subversion at mplayerhq.hu
Tue May 1 15:44:50 EEST 2018
Author: ib
Date: Tue May 1 15:44:49 2018
New Revision: 38105
Log:
Reset stream IDs on DVD title change.
An audio, video or subtitle track selected by the user
must be reset when the title of a DVD changes.
Modified:
trunk/gui/interface.c
trunk/gui/interface.h
trunk/gui/ui/actions.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Thu Apr 26 07:01:01 2018 (r38104)
+++ trunk/gui/interface.c Tue May 1 15:44:49 2018 (r38105)
@@ -201,6 +201,17 @@ static void remove_vf(char *vf)
}
}
+/**
+ * @brief Reset the audio, video and subtitles stream IDs.
+ */
+void reset_stream_ids(void)
+{
+ audio_id = -1;
+ video_id = -1;
+ dvdsub_id = -1;
+ vobsub_id = -1;
+}
+
/* MPlayer -> GUI */
/**
@@ -504,11 +515,7 @@ int gui(int what, void *data)
wsEvents();
if (guiInfo.MediumChanged == GUI_MEDIUM_NEW) {
- audio_id = -1;
- video_id = -1;
- dvdsub_id = -1;
- vobsub_id = -1;
-
+ reset_stream_ids();
stream_cache_size = -1;
autosync = 0;
force_fps = 0;
Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h Thu Apr 26 07:01:01 2018 (r38104)
+++ trunk/gui/interface.h Tue May 1 15:44:49 2018 (r38105)
@@ -151,6 +151,8 @@ typedef struct {
extern guiInterface_t guiInfo;
+void reset_stream_ids(void);
+
/// @name MPlayer -> GUI
//@{
int gui(int what, void *data);
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Thu Apr 26 07:01:01 2018 (r38104)
+++ trunk/gui/ui/actions.c Tue May 1 15:44:49 2018 (r38105)
@@ -169,12 +169,14 @@ void uiEvent(int ev, float param)
guiInfo.Track = iparam;
guiInfo.Chapter = 1;
guiInfo.Angle = 1;
+ reset_stream_ids();
uiEvent(ivPlayDVD, 0);
break;
case evPlayDVD:
guiInfo.Chapter = 1;
guiInfo.Angle = 1;
+ reset_stream_ids();
if (guiInfo.StreamType != STREAMTYPE_DVD)
guiInfo.Track = 0;
@@ -872,6 +874,7 @@ void uiPrev(void)
if (--guiInfo.Chapter == 0) {
guiInfo.Chapter = 1;
+ reset_stream_ids();
if (--guiInfo.Track == 0) {
guiInfo.Track = 1;
@@ -948,6 +951,7 @@ void uiNext(void)
if (guiInfo.Chapter++ >= guiInfo.Chapters) {
guiInfo.Chapter = 1;
+ reset_stream_ids();
if (++guiInfo.Track > guiInfo.Tracks) {
guiInfo.Track = guiInfo.Tracks;
More information about the MPlayer-cvslog
mailing list