You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/avformat: Constify AVFormatContext.*_codec pointers
This also allows to exclusively use pointers to const AVCodec in fftools/ffmpeg_opt.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
committed by
James Almer
parent
420cedd497
commit
14fa0a4efb
@@ -14,6 +14,9 @@ libavutil: 2017-10-21
|
|||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2021-04-27 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h
|
||||||
|
Constified AVFormatContext.*_codec.
|
||||||
|
|
||||||
2021-04-27 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h
|
2021-04-27 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h
|
||||||
Constified the pointers to AVInputFormats and AVOutputFormats
|
Constified the pointers to AVInputFormats and AVOutputFormats
|
||||||
in AVFormatContext, avformat_alloc_output_context2(),
|
in AVFormatContext, avformat_alloc_output_context2(),
|
||||||
|
@@ -737,11 +737,11 @@ static int opt_recording_timestamp(void *optctx, const char *opt, const char *ar
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
|
static const AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
|
||||||
{
|
{
|
||||||
const AVCodecDescriptor *desc;
|
const AVCodecDescriptor *desc;
|
||||||
const char *codec_string = encoder ? "encoder" : "decoder";
|
const char *codec_string = encoder ? "encoder" : "decoder";
|
||||||
AVCodec *codec;
|
const AVCodec *codec;
|
||||||
|
|
||||||
codec = encoder ?
|
codec = encoder ?
|
||||||
avcodec_find_encoder_by_name(name) :
|
avcodec_find_encoder_by_name(name) :
|
||||||
|
@@ -1598,7 +1598,7 @@ typedef struct AVFormatContext {
|
|||||||
* the same codec_id.
|
* the same codec_id.
|
||||||
* Demuxing: Set by user
|
* Demuxing: Set by user
|
||||||
*/
|
*/
|
||||||
AVCodec *video_codec;
|
const AVCodec *video_codec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forced audio codec.
|
* Forced audio codec.
|
||||||
@@ -1606,7 +1606,7 @@ typedef struct AVFormatContext {
|
|||||||
* the same codec_id.
|
* the same codec_id.
|
||||||
* Demuxing: Set by user
|
* Demuxing: Set by user
|
||||||
*/
|
*/
|
||||||
AVCodec *audio_codec;
|
const AVCodec *audio_codec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forced subtitle codec.
|
* Forced subtitle codec.
|
||||||
@@ -1614,7 +1614,7 @@ typedef struct AVFormatContext {
|
|||||||
* the same codec_id.
|
* the same codec_id.
|
||||||
* Demuxing: Set by user
|
* Demuxing: Set by user
|
||||||
*/
|
*/
|
||||||
AVCodec *subtitle_codec;
|
const AVCodec *subtitle_codec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forced data codec.
|
* Forced data codec.
|
||||||
@@ -1622,7 +1622,7 @@ typedef struct AVFormatContext {
|
|||||||
* the same codec_id.
|
* the same codec_id.
|
||||||
* Demuxing: Set by user
|
* Demuxing: Set by user
|
||||||
*/
|
*/
|
||||||
AVCodec *data_codec;
|
const AVCodec *data_codec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of bytes to be written as padding in a metadata header.
|
* Number of bytes to be written as padding in a metadata header.
|
||||||
|
Reference in New Issue
Block a user