0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vd_lavc: change VDCTRL_REINIT_VO behavior

This tried to use ctx->pic (last decoded AVFrame) for the frame bounds.
However, if av_frame_unref() on the AVFrame is called, the function will
reset _all_ AVFrame fields, even those which are not involved with
memory management. As result, mpcodecs_config_vo() was called with 0
width/height, which made the function exit early, instead of
reconfiguring the filter chain.

Go back to using mpcodecs_config_vo() directly. (That's what it did
before this VDCTRL was originally introduced; the original reason for
it disappeared.)
This commit is contained in:
wm4 2013-05-18 12:25:14 +02:00
parent c970f5c328
commit 41d38b3a2b

View File

@ -773,9 +773,7 @@ static int control(sh_video_t *sh, int cmd, void *arg)
*(int *)arg = delay;
return CONTROL_TRUE;
case VDCTRL_REINIT_VO:
if (ctx->vo_initialized)
ctx->vo_initialized = false;
init_vo(sh, ctx->pic);
mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, ctx->best_csp);
return true;
}
return CONTROL_UNKNOWN;