summaryrefslogtreecommitdiff
path: root/doc/examples/muxing.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-25 07:45:51 +0100
committerJames Almer <jamrial@gmail.com>2021-04-27 10:43:14 -0300
commit626535f6a169e2d821b969e0ea77125ba7482113 (patch)
treebfab6bbc7157ec5163ed8ae3bf3978f74f4fdd3e /doc/examples/muxing.c
parent14fa0a4efbc989619860ed8ec0fd33dcdae558b0 (diff)
avcodec/codec, allcodecs: Constify the AVCodec API
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'doc/examples/muxing.c')
-rw-r--r--doc/examples/muxing.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 014359e2ca..fe1b9ded21 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -121,7 +121,7 @@ static int write_frame(AVFormatContext *fmt_ctx, AVCodecContext *c,
/* Add an output stream. */
static void add_stream(OutputStream *ost, AVFormatContext *oc,
- AVCodec **codec,
+ const AVCodec **codec,
enum AVCodecID codec_id)
{
AVCodecContext *c;
@@ -242,7 +242,8 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt,
return frame;
}
-static void open_audio(AVFormatContext *oc, AVCodec *codec, OutputStream *ost, AVDictionary *opt_arg)
+static void open_audio(AVFormatContext *oc, const AVCodec *codec,
+ OutputStream *ost, AVDictionary *opt_arg)
{
AVCodecContext *c;
int nb_samples;
@@ -405,7 +406,8 @@ static AVFrame *alloc_picture(enum AVPixelFormat pix_fmt, int width, int height)
return picture;
}
-static void open_video(AVFormatContext *oc, AVCodec *codec, OutputStream *ost, AVDictionary *opt_arg)
+static void open_video(AVFormatContext *oc, const AVCodec *codec,
+ OutputStream *ost, AVDictionary *opt_arg)
{
int ret;
AVCodecContext *c = ost->enc;
@@ -539,7 +541,7 @@ int main(int argc, char **argv)
const AVOutputFormat *fmt;
const char *filename;
AVFormatContext *oc;
- AVCodec *audio_codec, *video_codec;
+ const AVCodec *audio_codec, *video_codec;
int ret;
int have_video = 0, have_audio = 0;
int encode_video = 0, encode_audio = 0;