]> git.sesse.net Git - ffmpeg/blobdiff - doc/examples/transcoding.c
avcodec/codec, allcodecs: Constify the AVCodec API
[ffmpeg] / doc / examples / transcoding.c
index 6ca30893304954ce89287d2a929187c22932da74..3a97426e2c42e4304d951b95d29066af3d08fe78 100644 (file)
@@ -77,7 +77,7 @@ static int open_input_file(const char *filename)
 
     for (i = 0; i < ifmt_ctx->nb_streams; i++) {
         AVStream *stream = ifmt_ctx->streams[i];
-        AVCodec *dec = avcodec_find_decoder(stream->codecpar->codec_id);
+        const AVCodec *dec = avcodec_find_decoder(stream->codecpar->codec_id);
         AVCodecContext *codec_ctx;
         if (!dec) {
             av_log(NULL, AV_LOG_ERROR, "Failed to find decoder for stream #%u\n", i);
@@ -122,7 +122,7 @@ static int open_output_file(const char *filename)
     AVStream *out_stream;
     AVStream *in_stream;
     AVCodecContext *dec_ctx, *enc_ctx;
-    AVCodec *encoder;
+    const AVCodec *encoder;
     int ret;
     unsigned int i;