changeset 36437:eb6cdd6b9b86

Update track information at GUI_SET_STREAM for CDDA and VCD. This is (only) necessary for playbacks that have been started on the command line (specifying such as cdda://5 or vcd://2) rather than using the GUI menus. For TV/DVB (that don't have tracks) set it to a fixed value.
author ib
date Mon, 02 Dec 2013 14:43:24 +0000
parents 00e6d020db41
children 63be95f0e125
files gui/interface.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Mon Dec 02 14:38:08 2013 +0000
+++ b/gui/interface.c	Mon Dec 02 14:43:24 2013 +0000
@@ -614,11 +614,15 @@
         case STREAMTYPE_CDDA:
             guiInfo.Tracks = 0;
             stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks);
+            if (stream_control(stream, STREAM_CTRL_GET_CURRENT_TITLE, &guiInfo.Track) == STREAM_OK)
+                guiInfo.Track++;
             break;
 
         case STREAMTYPE_VCD:
             guiInfo.Tracks = 0;
             stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks);
+            if (stream_control(stream, STREAM_CTRL_GET_CURRENT_TITLE, &guiInfo.Track) == STREAM_OK)
+                guiInfo.Track++;
             break;
 
         case STREAMTYPE_DVD:
@@ -644,7 +648,7 @@
 
         case STREAMTYPE_TV:
         case STREAMTYPE_DVB:
-            guiInfo.Tracks = 1;
+            guiInfo.Tracks = guiInfo.Track = 1;
             break;
         }