Mercurial > mplayer.hg
changeset 36430:08f21a09a545
Don't discard current DVD track information without cause.
In case STREAM_CTRL_GET_CURRENT_TITLE fails, use the information the
GUI already has (though it might be inaccurate in extremely rare cases).
author | ib |
---|---|
date | Fri, 29 Nov 2013 13:10:31 +0000 |
parents | 28ea255e40ce |
children | 3b09a2c78b84 |
files | gui/interface.c gui/win32/interface.c |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Fri Nov 29 12:41:32 2013 +0000 +++ b/gui/interface.c Fri Nov 29 13:10:31 2013 +0000 @@ -628,9 +628,8 @@ 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++; + if (stream_control(stream, STREAM_CTRL_GET_CURRENT_TITLE, &guiInfo.Track) == STREAM_OK) + 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 Fri Nov 29 12:41:32 2013 +0000 +++ b/gui/win32/interface.c Fri Nov 29 13:10:31 2013 +0000 @@ -664,9 +664,8 @@ 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++; + if (stream_control(stream, STREAM_CTRL_GET_CURRENT_TITLE, &guiInfo.Track) == STREAM_OK) + guiInfo.Track++; // guiInfo.Chapter will be set by mplayer guiInfo.Angle = 1; stream_control(stream, STREAM_CTRL_GET_ANGLE, &guiInfo.Angle);