From ad144017204a7537a9b95712541e7425d6722763 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 11 Dec 2010 18:37:00 +0000 Subject: [PATCH] vd_ffmpeg: Reset ctx->vo_initialized to 0 on a resolution change Otherwise we might think the filter chain/vo is ready when it actually is not, leading to a crash. Fixes crash part of bug 1156. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32690 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 0096737fdf..a874b8411c 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -473,6 +473,7 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ pix_fmt != ctx->pix_fmt || !ctx->vo_initialized) { + ctx->vo_initialized = 0; mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect); // Do not overwrite s->aspect on the first call, so that a container