mirror of
https://github.com/mpv-player/mpv
synced 2025-02-03 13:41:49 +00:00
lavc_conv: do not allow libavcodec to drop subtitles with broken UTF-8
libavcodec normally drops subtitle lines that fail a check for invalid UTF-8 (their check is slightly broken too, by the way). This was always annoying and inconvenient, but now there is a mechanism to prevent it from doing this. Requires newst libavcodec.
This commit is contained in:
parent
cdbd20581e
commit
af9c6c1133
@ -94,6 +94,7 @@ struct lavc_conv *lavc_conv_create(struct mp_log *log, const char *codec_name,
|
|||||||
avctx->time_base = (AVRational) {1, 1000};
|
avctx->time_base = (AVRational) {1, 1000};
|
||||||
#if LIBAVCODEC_VERSION_MICRO >= 100
|
#if LIBAVCODEC_VERSION_MICRO >= 100
|
||||||
avctx->pkt_timebase = avctx->time_base;
|
avctx->pkt_timebase = avctx->time_base;
|
||||||
|
avctx->sub_charenc_mode = FF_SUB_CHARENC_MODE_IGNORE;
|
||||||
#endif
|
#endif
|
||||||
priv->avctx = avctx;
|
priv->avctx = avctx;
|
||||||
priv->extradata = talloc_strndup(priv, avctx->subtitle_header,
|
priv->extradata = talloc_strndup(priv, avctx->subtitle_header,
|
||||||
|
2
wscript
2
wscript
@ -413,7 +413,7 @@ iconv support use --disable-iconv.",
|
|||||||
|
|
||||||
ffmpeg_pkg_config_checks = [
|
ffmpeg_pkg_config_checks = [
|
||||||
'libavutil', '>= 56.8.100',
|
'libavutil', '>= 56.8.100',
|
||||||
'libavcodec', '>= 58.10.100',
|
'libavcodec', '>= 58.16.100',
|
||||||
'libavformat', '>= 58.9.100',
|
'libavformat', '>= 58.9.100',
|
||||||
'libswscale', '>= 5.0.101',
|
'libswscale', '>= 5.0.101',
|
||||||
'libavfilter', '>= 7.0.101',
|
'libavfilter', '>= 7.0.101',
|
||||||
|
Loading…
Reference in New Issue
Block a user