mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
lavc: add const to AVCodec* function parameters.
This commit is contained in:
+6
-5
@@ -96,7 +96,8 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
|
||||
/* encoder management */
|
||||
static AVCodec *first_avcodec = NULL;
|
||||
|
||||
AVCodec *av_codec_next(AVCodec *c){
|
||||
AVCodec *av_codec_next(const AVCodec *c)
|
||||
{
|
||||
if(c) return c->next;
|
||||
else return first_avcodec;
|
||||
}
|
||||
@@ -112,12 +113,12 @@ static void avcodec_init(void)
|
||||
ff_dsputil_static_init();
|
||||
}
|
||||
|
||||
int av_codec_is_encoder(AVCodec *codec)
|
||||
int av_codec_is_encoder(const AVCodec *codec)
|
||||
{
|
||||
return codec && (codec->encode || codec->encode2);
|
||||
}
|
||||
|
||||
int av_codec_is_decoder(AVCodec *codec)
|
||||
int av_codec_is_decoder(const AVCodec *codec)
|
||||
{
|
||||
return codec && codec->decode;
|
||||
}
|
||||
@@ -627,7 +628,7 @@ AVFrame *avcodec_alloc_frame(void){
|
||||
return pic;
|
||||
}
|
||||
|
||||
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
|
||||
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
|
||||
{
|
||||
int ret = 0;
|
||||
AVDictionary *tmp = NULL;
|
||||
@@ -1508,7 +1509,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
|
||||
{
|
||||
const char *codec_name;
|
||||
const char *profile = NULL;
|
||||
AVCodec *p;
|
||||
const AVCodec *p;
|
||||
char buf1[32];
|
||||
int bitrate;
|
||||
AVRational display_aspect_ratio;
|
||||
|
||||
Reference in New Issue
Block a user