Mercurial > mplayer.hg
diff libmpcodecs/vd_ffmpeg.c @ 16963:4aa0f65686a6
do not set ctx->vo_inited when init fails. This caused a crash when a
matching colorspace is missing in codecs.conf.
| author | reimar |
|---|---|
| date | Thu, 10 Nov 2005 20:36:37 +0000 |
| parents | 182794778785 |
| children | 177c02c3785f |
line wrap: on
line diff
--- 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; }
