Mercurial > mplayer.hg
diff libmpcodecs/vd_ffmpeg.c @ 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 | 038ff73f9894 |
children | a6be6a134ac0 |
line wrap: on
line diff
--- 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)