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>
This commit is contained in:
Michael Niedermayer
2012-08-11 16:07:28 +02:00
parent d0bf3bf1ff
commit da74e883f1
3 changed files with 15 additions and 1 deletions
+12
View File
@@ -3035,6 +3035,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
@@ -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.
*/