mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
av: Use av_codec_is_{en,de}coder() API instead of private struct fields
This commit is contained in:
parent
aa4a238506
commit
d840211412
4 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -589,7 +589,7 @@ gst_ffmpegaudenc_register (GstPlugin * plugin)
|
|||
}
|
||||
|
||||
/* only encoders */
|
||||
if (!in_plugin->encode2) {
|
||||
if (!av_codec_is_encoder (in_plugin)) {
|
||||
goto next;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue