diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-11-10 20:36:37 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-11-10 20:36:37 +0000 |
commit | 77909fb136cde4bb3f2537f459c753fe1f55a94a (patch) | |
tree | 8b26cd6a85f9098c84bb2f268c73908c0aa5f05b /libmpcodecs/vd_ffmpeg.c | |
parent | cf440b521e0c16420bdb6bdb89f400a551933573 (diff) | |
download | mpv-77909fb136cde4bb3f2537f459c753fe1f55a94a.tar.bz2 mpv-77909fb136cde4bb3f2537f459c753fe1f55a94a.tar.xz |
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
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |