Browse Source

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
tags/n0.8
Anssi Hannula Carl Eugen Hoyos 15 years ago
parent
commit
cf99e4aa00
2 changed files with 7 additions and 1 deletions
  1. +3
    -1
      libavformat/avformat.h
  2. +4
    -0
      libavformat/utils.c

+ 3
- 1
libavformat/avformat.h View File

@@ -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;


+ 4
- 0
libavformat/utils.c View File

@@ -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;



Loading…
Cancel
Save