diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-23 20:14:59 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-23 20:14:59 +0300 |
commit | e3bd668ebd5f669e5f7d109191c87c678b569bb7 (patch) | |
tree | 81386faedc65029b861daec506bf553a39f3ace0 /command.c | |
parent | 97db8519c8f64dc8b0163b1eff6cbe4d6fe75c11 (diff) | |
download | mpv-e3bd668ebd5f669e5f7d109191c87c678b569bb7.tar.bz2 mpv-e3bd668ebd5f669e5f7d109191c87c678b569bb7.tar.xz |
Move seek-reset functionality out of demuxer.c
Move code for resetting decoders after seeks, chapter seeks and angle
changes out of demuxer.c. This functionality belongs on a higher
level; the demux layer can't always know what kind of reinitialization
is required.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -45,6 +45,7 @@ #include "mpcommon.h" #include "mixer.h" #include "libmpcodecs/dec_video.h" +#include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_teletext.h" #include "vobsub.h" #include "spudec.h" @@ -523,6 +524,16 @@ static int mp_property_angle(m_option_t *prop, int action, void *arg, return M_PROPERTY_NOT_IMPLEMENTED; } angle = demuxer_set_angle(mpctx->demuxer, angle); + if (angle >= 0) { + struct sh_video *sh_video = mpctx->demuxer->video->sh; + if (sh_video) + resync_video_stream(sh_video); + + struct sh_audio *sh_audio = mpctx->demuxer->audio->sh; + if (sh_audio) + resync_audio_stream(sh_audio); + } + set_osd_tmsg(OSD_MSG_TEXT, 1, opts->osd_duration, "Angle: %d/%d", angle, angles); if (angle_name) |