aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-11 16:07:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-12 14:51:19 +0200
commitda74e883f14469a1aad7c07c9aa7629a554bbceb (patch)
treedaf46b8b917697ab4eb0df2c982ce7a6192cafd9 /libavcodec/avcodec.h
parentd0bf3bf1ffaf810d8e0737847666a9b86ea5929f (diff)
downloadffmpeg-da74e883f14469a1aad7c07c9aa7629a554bbceb.tar.gz
lavc: add codec_descriptor field to AVCodecContext.
This can be used to avoid a time consuming lookup of the descriptor Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 351e3720f5..f739acd8ca 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3036,6 +3036,15 @@ typedef struct AVCodecContext {
AVRational pkt_timebase;
/**
+ * AVCodecDescriptor
+ * Code outside libavcodec should access this field using:
+ * avcodec_get_codec_descriptior(avctx)
+ * - encoding: unused.
+ * - decoding: set by libavcodec.
+ */
+ AVCodecDescriptor *codec_descriptor;
+
+ /**
* Current statistics for PTS correction.
* - decoding: maintained and used by libavcodec, not intended to be used by user apps
* - encoding: unused
@@ -3049,6 +3058,9 @@ typedef struct AVCodecContext {
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val);
+AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
+void av_codec_set_codec_descriptor(AVCodecContext *avctx, AVCodecDescriptor *desc);
+
/**
* AVProfile.
*/