diff options
author | wm4 <wm4@nowhere> | 2016-01-14 09:46:03 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-14 09:46:11 +0100 |
commit | c9204fe3a521654b914c91893faa709158db77ba (patch) | |
tree | 2ff97f862ddaa37b88426fa80d595840630c9e7e /video | |
parent | 24e7fac50bbf0d303c4f020e330ad7d566941216 (diff) | |
download | mpv-c9204fe3a521654b914c91893faa709158db77ba.tar.bz2 mpv-c9204fe3a521654b914c91893faa709158db77ba.tar.xz |
video: fix interactively changing aspect ratio
The aspect ratio calculations are cached (mainly so that aspect ratio
related messages are not logged on every frame). The cache is not clared
anymore when video filters are reconfigured, but changing the
video-aspect-ratio property relied on it. Make it explicit.
Fixes #2714.
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/dec_video.c | 5 | ||||
-rw-r--r-- | video/decode/dec_video.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index 9cd3ecf962..00af2e4c7b 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -359,3 +359,8 @@ struct mp_image *video_decode(struct dec_video *d_video, d_video->decoded_pts = pts; return mpi; } + +void video_reset_aspect(struct dec_video *d_video) +{ + d_video->last_format = (struct mp_image_params){0}; +} diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h index a093370213..dc2f62f4a4 100644 --- a/video/decode/dec_video.h +++ b/video/decode/dec_video.h @@ -87,5 +87,6 @@ struct mp_image *video_decode(struct dec_video *d_video, int video_vd_control(struct dec_video *d_video, int cmd, void *arg); void video_reset_decoding(struct dec_video *d_video); +void video_reset_aspect(struct dec_video *d_video); #endif /* MPLAYER_DEC_VIDEO_H */ |