diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2010-03-31 20:40:49 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2010-03-31 20:40:49 +0000 |
commit | d103218046883cb9e7f6e83af53b0982fee370ba (patch) | |
tree | 3cef854c1f1a61160c817b945fc02d678d63a662 /libavcodec/avcodec.h | |
parent | e33f1fa0a91868d58670a6f0b71f80b6b8a4e7d5 (diff) | |
download | ffmpeg-d103218046883cb9e7f6e83af53b0982fee370ba.tar.gz |
Add avcodec_copy_context().
Originally committed as revision 22750 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 12d9b3d47c..251e47dbc6 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3259,6 +3259,19 @@ AVCodecContext *avcodec_alloc_context(void); AVCodecContext *avcodec_alloc_context2(enum AVMediaType); /** + * Copy the settings of the source AVCodecContext into the destination + * AVCodecContext. The resulting destination codec context will be + * unopened, i.e. you are required to call avcodec_open() before you + * can use this AVCodecContext to decode/encode video/audio data. + * + * @param dest target codec context, should be initialized with + * avcodec_alloc_context(), but otherwise uninitialized + * @param src source codec context + * @return AVERROR() on error (e.g. memory allocation error), 0 on success + */ +int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src); + +/** * Sets the fields of the given AVFrame to default values. * * @param pic The AVFrame of which the fields should be set to default values. |