mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user