# HG changeset patch # User reimar # Date 1301164625 0 # Node ID dba2e72188937aaf0185d8b5cb1864ae0c698ac9 # Parent 31ced51f7e47978a4f88ab81826d599002a09db8 Disable the combination of slices and multithreaded decode by default, it usually results in a fully black picture. diff -r 31ced51f7e47 -r dba2e7218893 libmpcodecs/vd.c --- a/libmpcodecs/vd.c Sat Mar 26 16:11:18 2011 +0000 +++ b/libmpcodecs/vd.c Sat Mar 26 18:37:05 2011 +0000 @@ -128,7 +128,7 @@ float screen_size_xy = 0; float movie_aspect = -1.0; int vo_flags = 0; -int vd_use_slices = 1; +int vd_use_slices = -1; /** global variables for gamma, brightness, contrast, saturation and hue modified by mplayer.c and gui/mplayer/gtk/eq.c: diff -r 31ced51f7e47 -r dba2e7218893 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Sat Mar 26 16:11:18 2011 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Mar 26 18:37:05 2011 +0000 @@ -265,6 +265,9 @@ AVCodec *lavc_codec; int lowres_w=0; int do_vis_debug= lavc_param_vismv || (lavc_param_debug&(FF_DEBUG_VIS_MB_TYPE|FF_DEBUG_VIS_QP)); + // slice is rather broken with threads, so disable that combination unless + // explicitly requested + int use_slices = vd_use_slices > 0 || (vd_use_slices < 0 && lavc_param_threads <= 1); init_avcodec(); @@ -280,7 +283,7 @@ return 0; } - if(vd_use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug) + if(use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug) ctx->do_slices=1; if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ && lavc_codec->id != CODEC_ID_VP8 && lavc_codec->id != CODEC_ID_LAGARITH)