summaryrefslogtreecommitdiffstats
path: root/sub/sd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-01 19:40:09 +0200
committerwm4 <wm4@nowhere>2013-06-01 19:42:00 +0200
commitf7b9b92179333e5bf399cbb6289b66ed3439445c (patch)
tree870c8b95172a50d6cb9678c8cfebc99beb4a17c8 /sub/sd_lavc.c
parent28116b8a799078b3c6b3b559ed4463669c79cf0e (diff)
downloadmpv-f7b9b92179333e5bf399cbb6289b66ed3439445c.tar.bz2
mpv-f7b9b92179333e5bf399cbb6289b66ed3439445c.tar.xz
sub: various minor subtitle related changes
Just pushing some code around.
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r--sub/sd_lavc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c
index 4e1d80d8ce..4c7dfd12a5 100644
--- a/sub/sd_lavc.c
+++ b/sub/sd_lavc.c
@@ -43,21 +43,18 @@ 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) {
case AV_CODEC_ID_DVB_SUBTITLE:
case AV_CODEC_ID_HDMV_PGS_SUBTITLE:
case AV_CODEC_ID_XSUB:
+ // 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)
case AV_CODEC_ID_DVD_SUBTITLE:
+#endif
return true;
default:
return false;