Mercurial > mplayer.hg
changeset 33032:dba2e7218893
Disable the combination of slices and multithreaded decode by default, it
usually results in a fully black picture.
author | reimar |
---|---|
date | Sat, 26 Mar 2011 18:37:05 +0000 |
parents | 31ced51f7e47 |
children | 1aed51b973fa |
files | libmpcodecs/vd.c libmpcodecs/vd_ffmpeg.c |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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)