mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
vd_ffmpeg: disable codec direct rendering and slices by default
This caused failures when doing single threaded decoding in some cases. It's unknown what exactly the reasons are for these failures, but direct rendering is probably worthless anyway. Disable slices by default as well, just to be sure not to invoke broken code paths. Multithreading disables these too. The old behavior can be restored by passing the -dr1 -slices command line options. (-dr1 is left undocumented intentionally.) Multithreaded decoding worked fine, because vd_ffmpeg.c automatically disables direct rendering in this case.
This commit is contained in:
@@ -489,6 +489,8 @@ const m_option_t common_opts[] = {
|
||||
|
||||
// draw by slices or whole frame (useful with libmpeg2/libavcodec)
|
||||
OPT_MAKE_FLAGS("slices", vd_use_slices, 0),
|
||||
// use (probably completely broken) decoder direct rendering
|
||||
OPT_MAKE_FLAGS("dr1", vd_use_dr1, 0),
|
||||
{"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
|
||||
|
||||
{"lavdopts", (void *) lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
||||
|
||||
@@ -48,7 +48,6 @@ void set_default_mplayer_options(struct MPOpts *opts)
|
||||
.drc_level = 1.,
|
||||
.movie_aspect = -1.,
|
||||
.flip = -1,
|
||||
.vd_use_slices = 1,
|
||||
.sub_auto = 1,
|
||||
#ifdef CONFIG_ASS
|
||||
.ass_enabled = 1,
|
||||
|
||||
@@ -174,7 +174,7 @@ static int init(sh_video_t *sh)
|
||||
&& 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)
|
||||
ctx->do_dr1 = 1;
|
||||
ctx->do_dr1 = sh->opts->vd_use_dr1;
|
||||
ctx->ip_count = ctx->b_count = 0;
|
||||
|
||||
ctx->pic = avcodec_alloc_frame();
|
||||
|
||||
Reference in New Issue
Block a user