mirror of
https://github.com/mpv-player/mpv
synced 2024-08-28 05:46:13 +02:00
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
This commit is contained in:
parent
cf440b521e
commit
77909fb136
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user