[FFmpeg-cvslog] r26195 - in trunk/libavformat: avformat.h utils.c
cehoyos
subversion
Sun Jan 2 11:52:34 CET 2011
Author: cehoyos
Date: Sun Jan 2 11:52:34 2011
New Revision: 26195
Log:
Add AVOption support for muxers.
Patch by Anssi Hannula, anssi d hannula a iki d fi
Modified:
trunk/libavformat/avformat.h
trunk/libavformat/utils.c
Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h Sun Jan 2 11:46:50 2011 (r26194)
+++ trunk/libavformat/avformat.h Sun Jan 2 11:52:34 2011 (r26195)
@@ -22,7 +22,7 @@
#define AVFORMAT_AVFORMAT_H
#define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 91
+#define LIBAVFORMAT_VERSION_MINOR 92
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -368,6 +368,8 @@ typedef struct AVOutputFormat {
const AVMetadataConv *metadata_conv;
#endif
+ const AVClass *priv_class; ///< AVClass for the private context
+
/* private fields */
struct AVOutputFormat *next;
} AVOutputFormat;
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Sun Jan 2 11:46:50 2011 (r26194)
+++ trunk/libavformat/utils.c Sun Jan 2 11:52:34 2011 (r26195)
@@ -2720,6 +2720,10 @@ int av_set_parameters(AVFormatContext *s
s->priv_data = av_mallocz(s->oformat->priv_data_size);
if (!s->priv_data)
return AVERROR(ENOMEM);
+ if (s->oformat->priv_class) {
+ *(const AVClass**)s->priv_data= s->oformat->priv_class;
+ av_opt_set_defaults(s->priv_data);
+ }
} else
s->priv_data = NULL;
More information about the ffmpeg-cvslog
mailing list