summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-18 12:25:14 +0200
committerwm4 <wm4@nowhere>2013-05-18 17:32:37 +0200
commit41d38b3a2b7d019dba4fce7a6f4e045661d2e032 (patch)
tree84e8d239f27ac1d886063f3ed10e8a60a1ce09af /video
parentc970f5c3288a0e0cb925327182d4317768be0b83 (diff)
downloadmpv-41d38b3a2b7d019dba4fce7a6f4e045661d2e032.tar.bz2
mpv-41d38b3a2b7d019dba4fce7a6f4e045661d2e032.tar.xz
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.)
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c4
1 files changed, 1 insertions, 3 deletions
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;