[MPlayer-cvslog] r35656 - in trunk/gui/ui: actions.c actions.h

ib subversion at mplayerhq.hu
Mon Dec 10 14:57:53 CET 2012


Author: ib
Date: Mon Dec 10 14:57:53 2012
New Revision: 35656

Log:
Add a function to unset media information.

Modified:
   trunk/gui/ui/actions.c
   trunk/gui/ui/actions.h

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Mon Dec 10 14:54:56 2012	(r35655)
+++ trunk/gui/ui/actions.c	Mon Dec 10 14:57:53 2012	(r35656)
@@ -279,18 +279,7 @@ void uiSetFile(char *dir, char *name, in
 
     if (type != SAME_STREAMTYPE) {
         guiInfo.StreamType = type;
-
-        guiInfo.VideoWidth    = 0;
-        guiInfo.VideoHeight   = 0;
-        guiInfo.AudioChannels = 0;
-        guiInfo.RunningTime   = 0;
-        guiInfo.Track   = 0;
-        guiInfo.Chapter = 0;
-        guiInfo.Angle   = 0;
-
-        nfree(guiInfo.CodecName);
-        nfree(guiInfo.AudioFilename);
-        nfree(guiInfo.SubtitleFilename);
+        uiUnsetMedia();
     }
 }
 
@@ -303,6 +292,24 @@ void uiUnsetFile(void)
 }
 
 /**
+ * @brief Unset media information.
+ */
+void uiUnsetMedia(void)
+{
+    guiInfo.VideoWidth    = 0;
+    guiInfo.VideoHeight   = 0;
+    guiInfo.AudioChannels = 0;
+    guiInfo.RunningTime   = 0;
+    guiInfo.Track   = 0;
+    guiInfo.Chapter = 0;
+    guiInfo.Angle   = 0;
+
+    nfree(guiInfo.CodecName);
+    nfree(guiInfo.AudioFilename);
+    nfree(guiInfo.SubtitleFilename);
+}
+
+/**
  * @brief Set file to be played to current playlist entry.
  */
 void uiCurr(void)

Modified: trunk/gui/ui/actions.h
==============================================================================
--- trunk/gui/ui/actions.h	Mon Dec 10 14:54:56 2012	(r35655)
+++ trunk/gui/ui/actions.h	Mon Dec 10 14:57:53 2012	(r35656)
@@ -31,5 +31,6 @@ void uiRelSeek(float percent);
 void uiSetFile(char *dir, char *name, int type);
 void uiState(void);
 void uiUnsetFile(void);
+void uiUnsetMedia(void);
 
 #endif /* MPLAYER_GUI_ACTIONS_H */


More information about the MPlayer-cvslog mailing list