diff options
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r-- | sub/sd_lavc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index e067da6a43..4e1d80d8ce 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -43,6 +43,14 @@ struct sd_lavc_priv { static bool supports_format(const char *format) { + // lavc dvdsubdec doesn't read color/resolution on Libav 9.1 and below, + // so fall back to sd_spu in this case. Never use sd_spu with new ffmpeg; + // spudec can't handle ffmpeg .idx demuxing (added to lavc in 54.79.100). +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 40, 0) + if (is_dvd_sub(format)) + return false; +#endif + enum AVCodecID cid = mp_codec_to_av_codec_id(format); // Supported codecs must be known to decode to paletted bitmaps switch (cid) { |