[FFmpeg-cvslog] options: Fix warning about incompatible pointer type
jamal
git at videolan.org
Mon Jul 30 04:00:49 CEST 2012
ffmpeg | branch: master | jamal <jamrial at gmail.com> | Fri Jul 27 13:11:01 2012 -0300| [938e4470aeb94edb50d0999c81457132d0668603] | committer: Michael Niedermayer
options: Fix warning about incompatible pointer type
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=938e4470aeb94edb50d0999c81457132d0668603
---
libavcodec/options.c | 5 +++--
libavformat/options.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libavcodec/options.c b/libavcodec/options.c
index c8f770a..5dfc9c8 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -65,8 +65,9 @@ static const AVClass *codec_child_class_next(const AVClass *prev)
return NULL;
}
-static AVClassCategory get_category(AVCodecContext *avctx)
+static AVClassCategory get_category(void *ptr)
{
+ AVCodecContext* avctx = ptr;
if(avctx->codec && avctx->codec->decode) return AV_CLASS_CATEGORY_DECODER;
else return AV_CLASS_CATEGORY_ENCODER;
}
@@ -80,7 +81,7 @@ static const AVClass av_codec_context_class = {
.child_next = codec_child_next,
.child_class_next = codec_child_class_next,
.category = AV_CLASS_CATEGORY_ENCODER,
- .get_category = (void*)get_category,
+ .get_category = get_category,
};
#if FF_API_ALLOC_CONTEXT
diff --git a/libavformat/options.c b/libavformat/options.c
index 8548381..42307d1 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -76,8 +76,9 @@ static const AVClass *format_child_class_next(const AVClass *prev)
return NULL;
}
-static AVClassCategory get_category(AVFormatContext *s)
+static AVClassCategory get_category(void *ptr)
{
+ AVFormatContext* s = ptr;
if(s->iformat) return AV_CLASS_CATEGORY_DEMUXER;
else return AV_CLASS_CATEGORY_MUXER;
}
More information about the ffmpeg-cvslog
mailing list