From 41d38b3a2b7d019dba4fce7a6f4e045661d2e032 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 18 May 2013 12:25:14 +0200 Subject: 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.) --- video/decode/vd_lavc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'video') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 0881d72705..2e5d4115b3 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -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; -- cgit v1.2.3