From d85753b79e4ce0fa7a5ddac5b2ed0cf65f7aecd8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 27 Dec 2015 02:07:01 +0100 Subject: sub: refactor initialization Just simplify by removing parts not needed anymore. This includes merging dec_sub allocation and initialization (since things making initialization complicated were removed), or format support queries (it simply tries to create a decoder, and if that fails, tries the next one). --- sub/lavc_conv.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'sub/lavc_conv.c') diff --git a/sub/lavc_conv.c b/sub/lavc_conv.c index 7e2ed4ef25..b244240d7c 100644 --- a/sub/lavc_conv.c +++ b/sub/lavc_conv.c @@ -49,15 +49,6 @@ static const char *get_lavc_format(const char *format) return format; } -bool lavc_conv_supports_format(const char *format) -{ - format = get_lavc_format(format); - enum AVCodecID cid = mp_codec_to_av_codec_id(format); - AVCodec *codec = avcodec_find_decoder(cid); - const AVCodecDescriptor *desc = avcodec_descriptor_get(cid); - return codec && desc && desc->type == AVMEDIA_TYPE_SUBTITLE; -} - // Disable style definitions generated by the libavcodec converter. // We always want the user defined style instead. static void disable_styles(bstr header) -- cgit v1.2.3