diff options
author | 2011-11-14 20:12:20 +0200 | |
---|---|---|
committer | 2011-11-14 20:24:39 +0200 | |
commit | 3a39fc1feabf24a07084b4e1f68129c492e5d54a (patch) | |
tree | 9c2526b9dfb350b54bbc063870584b5d713cf2b7 /libmpcodecs/dec_video.c | |
parent | 7b9908dda875db404604e87c8b762784d4f774d1 (diff) |
commands, vd_ffmpeg: fix switch_ratio slave command
The implementation of the switch_ratio command was hacky and called
mpcodecs_config_vo() to reconfigure the filter/VO chain from under an
existing decoder. This call no longer worked properly with vd_ffmpeg
after that started using mpcodec_config_vo2(). Add new video decoder
control command VDCTRL_RESET_ASPECT and use this to tell vd_ffmpeg to
reinitialize the output chain properly.
Diffstat (limited to 'libmpcodecs/dec_video.c')
-rw-r--r-- | libmpcodecs/dec_video.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 91b255114a..cd3083faa4 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -212,6 +212,13 @@ void resync_video_stream(sh_video_t *sh_video) sh_video->prev_sorted_pts = MP_NOPTS_VALUE; } +void video_reset_aspect(struct sh_video *sh_video) +{ + int r = sh_video->vd_driver->control(sh_video, VDCTRL_RESET_ASPECT, NULL); + if (r != true) + mpcodecs_config_vo(sh_video, sh_video->disp_w, sh_video->disp_h, 0); +} + int get_current_video_decoder_lag(sh_video_t *sh_video) { const struct vd_functions *vd = sh_video->vd_driver; |