[MPlayer-cvslog] r37968 - trunk/gui/interface.c

ib subversion at mplayerhq.hu
Thu Oct 5 13:00:49 EEST 2017


Author: ib
Date: Thu Oct  5 13:00:49 2017
New Revision: 37968

Log:
Don't set last cue sheet playlist entry's stop time to zero.

The difference between an ordinary playlist entry and a cue sheet
playlist entry is that the former has a stop time of zero and the
latter has a non-zero stop time.

The length and thus the stop time of the last cue sheet playlist
entry is unknown, but it's unreasonable to set it to zero. Make
sure that it is greater than its start time.

Modified:
   trunk/gui/interface.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Oct  3 16:49:05 2017	(r37967)
+++ trunk/gui/interface.c	Thu Oct  5 13:00:49 2017	(r37968)
@@ -16,6 +16,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include <limits.h>
 #include <stdarg.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -576,7 +577,7 @@ int gui(int what, void *data)
                         if (*(playlist + 1))
                             (*playlist)->stop = (*(playlist + 1))->start;
                         else
-                            (*playlist)->stop = 0;
+                            (*playlist)->stop = INT_MAX;
 
                         listMgr(PLAYLIST_ITEM_INSERT, *playlist);
                         playlist++;


More information about the MPlayer-cvslog mailing list