From 77909fb136cde4bb3f2537f459c753fe1f55a94a Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 10 Nov 2005 20:36:37 +0000 Subject: do not set ctx->vo_inited when init fails. This caused a crash when a matching colorspace is missing in codecs.conf. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16964 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 8904fd981e..1fbdda0d90 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -533,7 +533,6 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ sh->aspect = ctx->last_aspect; sh->disp_w = width; sh->disp_h = height; - ctx->vo_inited=1; switch(pix_fmt){ // YUVJ are YUV formats that use the full Y range and not just // 16 - 235 (see colorspaces.txt). @@ -562,6 +561,7 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ } if (!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h, ctx->best_csp)) return -1; + ctx->vo_inited = 1; } return 0; } -- cgit v1.2.3