sd_lavc_conv: don't check AV_CODEC_PROP_TEXT_SUB flag

Not actually useful. This would break whenever a new text subtitle
format would be added, which requires a binary->text transformation.
(mov_text is one such format; disable it.) In general, we would have
to know which packet formats are binary, which we don't, so the only
reasonable way to handle this is a white list.
This commit is contained in:
wm4 2013-08-15 23:24:53 +02:00
parent 3e6ed76935
commit 8b245c4d4b
2 changed files with 3 additions and 18 deletions

11
configure vendored
View File

@ -2677,16 +2677,6 @@ if test "$_vdpau" = yes ; then
fi fi
fi fi
echocheck "libavcodec AV_CODEC_PROP_TEXT_SUB API"
_avcodec_has_text_flag_api=no
statement_check libavcodec/avcodec.h 'int x = AV_CODEC_PROP_TEXT_SUB' && _avcodec_has_text_flag_api=yes
if test "$_avcodec_has_text_flag_api" = yes ; then
def_avcodec_has_text_flag_api='#define HAVE_AV_CODEC_PROP_TEXT_SUB 1'
else
def_avcodec_has_text_flag_api='#define HAVE_AV_CODEC_PROP_TEXT_SUB 0'
fi
echores "$_avcodec_has_text_flag_api"
echocheck "libavcodec avcodec_enum_to_chroma_pos API" echocheck "libavcodec avcodec_enum_to_chroma_pos API"
_avcodec_has_chroma_pos_api=no _avcodec_has_chroma_pos_api=no
@ -3225,7 +3215,6 @@ $def_zlib
$def_avutil_has_refcounting $def_avutil_has_refcounting
$def_avutil_has_qp_api $def_avutil_has_qp_api
$def_avcodec_new_vdpau_api $def_avcodec_new_vdpau_api
$def_avcodec_has_text_flag_api
$def_avcodec_has_chroma_pos_api $def_avcodec_has_chroma_pos_api
$def_libpostproc $def_libpostproc
$def_libavdevice $def_libavdevice

View File

@ -40,12 +40,9 @@ static bool supports_format(const char *format)
const AVCodecDescriptor *desc = avcodec_descriptor_get(cid); const AVCodecDescriptor *desc = avcodec_descriptor_get(cid);
if (!desc) if (!desc)
return false; return false;
#if HAVE_AV_CODEC_PROP_TEXT_SUB // These are known to support AVSubtitleRect->ass.
// These are documented to support AVSubtitleRect->ass.
return desc->props & AV_CODEC_PROP_TEXT_SUB;
#else
const char *whitelist[] = const char *whitelist[] =
{"text", "ass", "ssa", "mov_text", "srt", "subrip", "microdvd", "mpl2", {"text", "ass", "ssa", "srt", "subrip", "microdvd", "mpl2",
"jacosub", "pjs", "sami", "realtext", "subviewer", "subviewer1", "jacosub", "pjs", "sami", "realtext", "subviewer", "subviewer1",
"vplayer", "webvtt", 0}; "vplayer", "webvtt", 0};
for (int n = 0; whitelist[n]; n++) { for (int n = 0; whitelist[n]; n++) {
@ -53,7 +50,6 @@ static bool supports_format(const char *format)
return true; return true;
} }
return false; return false;
#endif
} }
// Disable style definitions generated by the libavcodec converter. // Disable style definitions generated by the libavcodec converter.