# HG changeset patch # User ib # Date 1350831648 0 # Node ID 6f214e8ae780bf4757bcd20e0f3c4f9fba2ce032 # Parent 3b2c280da1afdcaeba89d482fe134c996597f756 Set guiInfo.Track after the stream is open. This is only necessary if the track hasn't been set by the GUI itself (but from a command line option, for example) in order to be able to show the track number in the GUI's menus. The GUI didn't show it in that case so far. diff -r 3b2c280da1af -r 6f214e8ae780 gui/interface.c --- a/gui/interface.c Sun Oct 21 14:56:50 2012 +0000 +++ b/gui/interface.c Sun Oct 21 15:00:48 2012 +0000 @@ -622,6 +622,9 @@ stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters); guiInfo.Angles = 0; stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles); + guiInfo.Track = 0; + stream_control(stream, STREAM_CTRL_GET_CURRENT_TITLE, &guiInfo.Track); + guiInfo.Track++; // guiInfo.Chapter will be set by mplayer guiInfo.Angle = 1; stream_control(stream, STREAM_CTRL_GET_ANGLE, &guiInfo.Angle); diff -r 3b2c280da1af -r 6f214e8ae780 gui/win32/interface.c --- a/gui/win32/interface.c Sun Oct 21 14:56:50 2012 +0000 +++ b/gui/win32/interface.c Sun Oct 21 15:00:48 2012 +0000 @@ -665,6 +665,9 @@ stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters); guiInfo.Angles = 0; stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles); + guiInfo.Track = 0; + stream_control(stream, STREAM_CTRL_GET_CURRENT_TITLE, &guiInfo.Track); + guiInfo.Track++; // guiInfo.Chapter will be set by mplayer guiInfo.Angle = 1; stream_control(stream, STREAM_CTRL_GET_ANGLE, &guiInfo.Angle);