[MPlayer-cvslog] r38064 - in trunk/gui: interface.c ui/actions.c
ib
subversion at mplayerhq.hu
Thu Apr 12 12:12:55 EEST 2018
Author: ib
Date: Thu Apr 12 12:12:55 2018
New Revision: 38064
Log:
Fix broken evLoadAudioFile.
It did not work so far. A separately loaded audio track did not play.
guiInfo.AudioFilename must not be cleared by uiUnsetMedia(FALSE),
because media is unset (i.e. prepared) this way whenever a new file
will be loaded for playback which happens *after* loading a separate
audio track.
So explicitly clear guiInfo.AudioFilename only by a full unset
(uiUnsetMedia(TRUE)) and regularly unset it after a playback has
ended (at GUI_END_PLAY).
Modified:
trunk/gui/interface.c
trunk/gui/ui/actions.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Wed Apr 11 15:12:44 2018 (r38063)
+++ trunk/gui/interface.c Thu Apr 12 12:12:55 2018 (r38064)
@@ -1041,6 +1041,8 @@ int gui(int what, void *data)
guiInfo.sh_video = NULL;
+ nfree(guiInfo.AudioFilename);
+
if (guiInfo.LastVolume >= 0.0f) {
if (guiInfo.Volume == guiInfo.ReplayGainVolume)
uiEvent(ivSetVolume, guiInfo.LastVolume);
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Wed Apr 11 15:12:44 2018 (r38063)
+++ trunk/gui/ui/actions.c Thu Apr 12 12:12:55 2018 (r38064)
@@ -764,7 +764,8 @@ void uiUnsetFile(void)
/**
* @brief Unset media information.
*
- * @param totals whether to additionally unset number of chapters and angles (#True)
+ * @param totals whether to additionally unset number of chapters, angles and
+ * audio filename (#True)
* or just track, chapter and angle (#False)
*/
void uiUnsetMedia(int totals)
@@ -782,6 +783,8 @@ void uiUnsetMedia(int totals)
if (guiInfo.StreamType != STREAMTYPE_BINCUE)
guiInfo.Angles = 0;
+
+ nfree(guiInfo.AudioFilename);
} else {
guiInfo.Track = 0;
guiInfo.Chapter = 0;
@@ -790,7 +793,6 @@ void uiUnsetMedia(int totals)
nfree(guiInfo.CodecName);
nfree(guiInfo.Title);
- nfree(guiInfo.AudioFilename);
nfree(guiInfo.SubtitleFilename);
nfree(guiInfo.ImageFilename);
}
More information about the MPlayer-cvslog
mailing list