mirror of
https://github.com/mpv-player/mpv
synced 2024-12-15 03:15:52 +00:00
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.
This commit is contained in:
parent
24e7fac50b
commit
c9204fe3a5
@ -2771,7 +2771,7 @@ static int mp_property_aspect(void *ctx, struct m_property *prop,
|
||||
case M_PROPERTY_SET: {
|
||||
mpctx->opts->movie_aspect = *(float *)arg;
|
||||
if (mpctx->d_video) {
|
||||
reinit_video_filters(mpctx);
|
||||
video_reset_aspect(mpctx->d_video);
|
||||
mp_force_video_refresh(mpctx);
|
||||
}
|
||||
return M_PROPERTY_OK;
|
||||
|
@ -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};
|
||||
}
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user