diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2011-01-02 10:52:34 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2011-01-02 10:52:34 +0000 |
commit | cf99e4aa00c4a74f3da5dd399c69da84fd176d4a (patch) | |
tree | d752c3a2b8fa723865e3aad763bdc751b1f43998 /libavformat | |
parent | febd72be6550cd5f4bda2269a382c9ff64d46e8a (diff) | |
download | ffmpeg-cf99e4aa00c4a74f3da5dd399c69da84fd176d4a.tar.gz |
Add AVOption support for muxers.
Patch by Anssi Hannula, anssi d hannula a iki d fi
Originally committed as revision 26195 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avformat.h | 4 | ||||
-rw-r--r-- | libavformat/utils.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index c6f282710c..56a1946fe7 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -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; diff --git a/libavformat/utils.c b/libavformat/utils.c index 6f994a1b70..e1928c4a55 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2720,6 +2720,10 @@ int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap) 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; |