diff options
Diffstat (limited to 'player/loadfile.c')
-rw-r--r-- | player/loadfile.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/player/loadfile.c b/player/loadfile.c index 3f131d1df6..e2a1e6e145 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1050,6 +1050,9 @@ static void play_current_file(struct MPContext *mpctx) goto terminate_playback; } + // Must be called before enabling cache. + mp_nav_init(mpctx); + int res = stream_enable_cache(&mpctx->stream, &opts->stream_cache); if (res == 0) if (demux_was_interrupted(mpctx)) @@ -1059,6 +1062,8 @@ static void play_current_file(struct MPContext *mpctx) goto_reopen_demuxer: ; + mp_nav_reset(mpctx); + //============ Open DEMUXERS --- DETECT file type ======================= mpctx->audio_delay = opts->audio_delay; @@ -1266,6 +1271,8 @@ goto_reopen_demuxer: ; terminate_playback: + mp_nav_destroy(mpctx); + if (mpctx->stop_play == KEEP_PLAYING) mpctx->stop_play = AT_END_OF_FILE; |