Mercurial > mplayer.hg
changeset 35170:6f214e8ae780
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.
author | ib |
---|---|
date | Sun, 21 Oct 2012 15:00:48 +0000 |
parents | 3b2c280da1af |
children | 75e4ee082dd2 |
files | gui/interface.c gui/win32/interface.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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);