diff options
author | Jan Ekström <jeebjp@gmail.com> | 2021-12-05 20:44:12 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2021-12-05 22:31:32 +0200 |
commit | 77142ed9b8aec67a846e91cdc4dddd3013f643bc (patch) | |
tree | 9b14014731a98b2fd79f22f959082a34125400a1 /sub/lavc_conv.c | |
parent | 036bda9166b6f50c096de72d4a110e83c1919403 (diff) | |
download | mpv-77142ed9b8aec67a846e91cdc4dddd3013f643bc.tar.bz2 mpv-77142ed9b8aec67a846e91cdc4dddd3013f643bc.tar.xz |
sub/lavc_conv: only set subtitle text format when required
Since libavcodec major version 59, the requested "ass" format became
the default as the old timing-included format was disabled starting
with that version. Additionally, this option by itself has since
been deprecated as it no longer serves any purpose.
References:
FFmpeg/FFmpeg@1f63665ca567fbc49fa80166d468a822c2999efa
FFmpeg/FFmpeg@176b8d785bf7531b6eb8e3d6e8c03f75cb29de1e
Fixes #9413
Diffstat (limited to 'sub/lavc_conv.c')
-rw-r--r-- | sub/lavc_conv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sub/lavc_conv.c b/sub/lavc_conv.c index 8e1d1aad7f..d9f628492c 100644 --- a/sub/lavc_conv.c +++ b/sub/lavc_conv.c @@ -83,7 +83,10 @@ struct lavc_conv *lavc_conv_create(struct mp_log *log, const char *codec_name, goto error; if (mp_lavc_set_extradata(avctx, extradata, extradata_len) < 0) goto error; + +#if LIBAVCODEC_VERSION_MAJOR < 59 av_dict_set(&opts, "sub_text_format", "ass", 0); +#endif av_dict_set(&opts, "flags2", "+ass_ro_flush_noop", 0); if (strcmp(codec_name, "eia_608") == 0) av_dict_set(&opts, "real_time", "1", 0); |