aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-03 22:41:05 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-19 17:22:07 +0200
commit08613d50d6e3088299fae6d2095fecb5e509aa9e (patch)
treebf0619f84e4e311a15e41448ec60a8e9aa4cc8e9 /libavformat
parent6fb7d03d742787fa74606e48d74ca317ec95acd3 (diff)
downloadffmpeg-08613d50d6e3088299fae6d2095fecb5e509aa9e.tar.gz
lavf: separate muxer/demuxer class category
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/options.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/options.c b/libavformat/options.c
index b1e8b0d45f..915581f13f 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -76,6 +76,12 @@ static const AVClass *format_child_class_next(const AVClass *prev)
return NULL;
}
+static AVClassCategory get_category(AVFormatContext *s)
+{
+ if(s->iformat) return AV_CLASS_CATEGORY_DEMUXER;
+ else return AV_CLASS_CATEGORY_MUXER;
+}
+
static const AVClass av_format_context_class = {
.class_name = "AVFormatContext",
.item_name = format_to_name,
@@ -84,6 +90,7 @@ static const AVClass av_format_context_class = {
.child_next = format_child_next,
.child_class_next = format_child_class_next,
.category = AV_CLASS_CATEGORY_MUXER,
+ .get_category = get_category,
};
static void avformat_get_context_defaults(AVFormatContext *s)