summaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-01-28 19:15:15 +0100
committerAnton Khirnov <anton@khirnov.net>2012-01-31 16:53:35 +0100
commitbc901998487bf9b77a423961d9f961bcc28a9291 (patch)
tree10fc23398897ab2e4294e11d3af307d091b3beeb /libavcodec/avcodec.h
parent0e72ad95f9fef6a6b8ae55e47339a5c40526502f (diff)
downloadffmpeg-streaming-bc901998487bf9b77a423961d9f961bcc28a9291.zip
ffmpeg-streaming-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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 77abec5..85bb599 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.
*
OpenPOWER on IntegriCloud