This also allows to exclusively use pointers to const AVCodec in fftools/ffmpeg_opt.c.
Unified · Split
| @@ -14,6 +14,9 @@ libavutil: 2017-10-21 · 13 unmodified lines | ||
| 14 | 14 | |
| 15 | 15 | API changes, most recent first: |
| 16 | 16 | |
| 17 | +2021-04-27 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h | |
| 18 | + Constified AVFormatContext.*_codec. | |
| 19 | + | |
| 17 | 20 | 2021-04-27 - xxxxxxxxxx - lavf yyyyyyyyy - avformat.h |
| 18 | 21 | Constified the pointers to AVInputFormats and AVOutputFormats |
| 19 | 22 | in AVFormatContext, avformat_alloc_output_context2(), |
| @@ -737,11 +737,11 @@ static int opt_recording_timestamp(void *optctx, const char *opt, const char *ar · 736 unmodified lines | ||
| 737 | 737 | return 0; |
| 738 | 738 | } |
| 739 | 739 | |
| 740 | −static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder) | |
| 740 | +static const AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder) | |
| 741 | 741 | { |
| 742 | 742 | const AVCodecDescriptor *desc; |
| 743 | 743 | const char *codec_string = encoder ? "encoder" : "decoder"; |
| 744 | − AVCodec *codec; | |
| 744 | + const AVCodec *codec; | |
| 745 | 745 | |
| 746 | 746 | codec = encoder ? |
| 747 | 747 | avcodec_find_encoder_by_name(name) : |
| @@ -1598,7 +1598,7 @@ typedef struct AVFormatContext { · 1597 unmodified lines | ||
| 1598 | 1598 | * the same codec_id. |
| 1599 | 1599 | * Demuxing: Set by user |
| 1600 | 1600 | */ |
| 1601 | − AVCodec *video_codec; | |
| 1601 | + const AVCodec *video_codec; | |
| 1602 | 1602 | |
| 1603 | 1603 | /** |
| 1604 | 1604 | * Forced audio codec. |
| @@ -1606,7 +1606,7 @@ typedef struct AVFormatContext { · 1 unmodified line | ||
| 1606 | 1606 | * the same codec_id. |
| 1607 | 1607 | * Demuxing: Set by user |
| 1608 | 1608 | */ |
| 1609 | − AVCodec *audio_codec; | |
| 1609 | + const AVCodec *audio_codec; | |
| 1610 | 1610 | |
| 1611 | 1611 | /** |
| 1612 | 1612 | * Forced subtitle codec. |
| @@ -1614,7 +1614,7 @@ typedef struct AVFormatContext { · 1 unmodified line | ||
| 1614 | 1614 | * the same codec_id. |
| 1615 | 1615 | * Demuxing: Set by user |
| 1616 | 1616 | */ |
| 1617 | − AVCodec *subtitle_codec; | |
| 1617 | + const AVCodec *subtitle_codec; | |
| 1618 | 1618 | |
| 1619 | 1619 | /** |
| 1620 | 1620 | * Forced data codec. |
| @@ -1622,7 +1622,7 @@ typedef struct AVFormatContext { · 1 unmodified line | ||
| 1622 | 1622 | * the same codec_id. |
| 1623 | 1623 | * Demuxing: Set by user |
| 1624 | 1624 | */ |
| 1625 | − AVCodec *data_codec; | |
| 1625 | + const AVCodec *data_codec; | |
| 1626 | 1626 | |
| 1627 | 1627 | /** |
| 1628 | 1628 | * Number of bytes to be written as padding in a metadata header. |