diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-01-28 19:15:15 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-01-31 16:53:35 +0100 |
commit | bc901998487bf9b77a423961d9f961bcc28a9291 (patch) | |
tree | 10fc23398897ab2e4294e11d3af307d091b3beeb /libavcodec/avcodec.h | |
parent | 0e72ad95f9fef6a6b8ae55e47339a5c40526502f (diff) | |
download | ffmpeg-bc901998487bf9b77a423961d9f961bcc28a9291.tar.gz |
lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().
This way, if the AVCodecContext is allocated for a specific codec, the
caller doesn't need to store this codec separately and then pass it
again to avcodec_open2().
It also allows to set codec private options using av_opt_set_* before
opening the codec.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 77abec59f6..85bb59909b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3525,6 +3525,11 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, * @endcode * * @param avctx The context to initialize. + * @param codec The codec to open this context for. If a non-NULL codec has been + * previously passed to avcodec_alloc_context3() or + * avcodec_get_context_defaults3() for this context, then this + * parameter MUST be either NULL or equal to the previously passed + * codec. * @param options A dictionary filled with AVCodecContext and codec-private options. * On return this object will be filled with options that were not found. * |