av: Use av_codec_is_{en,de}coder() API instead of private struct fields

This commit is contained in:
Sebastian Dröge 2012-12-05 10:52:34 +01:00
parent aa4a238506
commit d840211412
4 changed files with 7 additions and 4 deletions

View file

@ -775,7 +775,8 @@ gst_ffmpegauddec_register (GstPlugin * plugin)
gchar *plugin_name;
/* only decoders */
if (!in_plugin->decode || in_plugin->type != AVMEDIA_TYPE_AUDIO) {
if (!av_codec_is_decoder (in_plugin)
|| in_plugin->type != AVMEDIA_TYPE_AUDIO) {
goto next;
}

View file

@ -589,7 +589,7 @@ gst_ffmpegaudenc_register (GstPlugin * plugin)
}
/* only encoders */
if (!in_plugin->encode2) {
if (!av_codec_is_encoder (in_plugin)) {
goto next;
}

View file

@ -1621,7 +1621,8 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
gchar *plugin_name;
/* only video decoders */
if (!in_plugin->decode || in_plugin->type != AVMEDIA_TYPE_VIDEO)
if (!av_codec_is_decoder (in_plugin)
|| in_plugin->type != AVMEDIA_TYPE_VIDEO)
goto next;
/* no quasi-codecs, please */

View file

@ -981,7 +981,8 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
}
/* only video encoders */
if (!in_plugin->encode2 || in_plugin->type != AVMEDIA_TYPE_VIDEO)
if (!av_codec_is_encoder (in_plugin)
|| in_plugin->type != AVMEDIA_TYPE_VIDEO)
goto next;
/* FIXME : We should have a method to know cheaply whether we have a mapping