From d840211412bedc3bcbf16e48a47bdfc4174191a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 5 Dec 2012 10:52:34 +0100 Subject: [PATCH] av: Use av_codec_is_{en,de}coder() API instead of private struct fields --- ext/libav/gstavauddec.c | 3 ++- ext/libav/gstavaudenc.c | 2 +- ext/libav/gstavviddec.c | 3 ++- ext/libav/gstavvidenc.c | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/libav/gstavauddec.c b/ext/libav/gstavauddec.c index d01ae35..a7befb2 100644 --- a/ext/libav/gstavauddec.c +++ b/ext/libav/gstavauddec.c @@ -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; } diff --git a/ext/libav/gstavaudenc.c b/ext/libav/gstavaudenc.c index e7588b0..6356559 100644 --- a/ext/libav/gstavaudenc.c +++ b/ext/libav/gstavaudenc.c @@ -589,7 +589,7 @@ gst_ffmpegaudenc_register (GstPlugin * plugin) } /* only encoders */ - if (!in_plugin->encode2) { + if (!av_codec_is_encoder (in_plugin)) { goto next; } diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c index b763f94..279b74d 100644 --- a/ext/libav/gstavviddec.c +++ b/ext/libav/gstavviddec.c @@ -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 */ diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c index 8dd5a0d..807da68 100644 --- a/ext/libav/gstavvidenc.c +++ b/ext/libav/gstavvidenc.c @@ -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 -- 2.7.4