# HG changeset patch # User reimar # Date 1131654997 0 # Node ID 4aa0f65686a626ba0d823e49a9802a29071fe38a # Parent bdc218b5a49ac7655e5bced1e8903fd4147be6dd do not set ctx->vo_inited when init fails. This caused a crash when a matching colorspace is missing in codecs.conf. diff -r bdc218b5a49a -r 4aa0f65686a6 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Thu Nov 10 20:32:47 2005 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Thu Nov 10 20:36:37 2005 +0000 @@ -533,7 +533,6 @@ 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 @@ } if (!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h, ctx->best_csp)) return -1; + ctx->vo_inited = 1; } return 0; }