summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-14 01:00:02 +0100
committerwm4 <wm4@nowhere>2013-12-14 01:00:02 +0100
commitdf4d7fd07294eb074b0858fa49108d7e9801259e (patch)
treefc3ed6991be595f8f1b84df82c832ec8dbb296ca
parentfc75506e8b0d0fab4d4d51fa2765a04352cc144c (diff)
downloadmpv-df4d7fd07294eb074b0858fa49108d7e9801259e.tar.bz2
mpv-df4d7fd07294eb074b0858fa49108d7e9801259e.tar.xz
stream_dvdnav: drop stream buffers on seek
-rw-r--r--stream/stream_dvdnav.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index becc44bf34..6d019cbf43 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -539,13 +539,15 @@ static int control(stream_t *stream, int cmd, void *arg)
int title = *((unsigned int *) arg);
if (dvdnav_title_play(priv->dvdnav, title) != DVDNAV_STATUS_OK)
break;
+ stream_drop_buffers(stream);
return STREAM_OK;
}
case STREAM_CTRL_SEEK_TO_TIME: {
uint64_t tm = (uint64_t) (*((double *)arg) * 90000);
- if (dvdnav_time_search(dvdnav, tm) == DVDNAV_STATUS_OK)
- return 1;
- break;
+ if (dvdnav_time_search(dvdnav, tm) != DVDNAV_STATUS_OK)
+ break;
+ stream_drop_buffers(stream);
+ return STREAM_OK;
}
case STREAM_CTRL_GET_NUM_ANGLES: {
uint32_t curr, angles;