diff --git a/src/guacenc/ffmpeg-compat.c b/src/guacenc/ffmpeg-compat.c index 8bdb6e92..9f851c8e 100644 --- a/src/guacenc/ffmpeg-compat.c +++ b/src/guacenc/ffmpeg-compat.c @@ -214,7 +214,7 @@ int guacenc_avcodec_encode_video(guacenc_video* video, AVFrame* frame) { #endif } -AVCodecContext* guacenc_build_avcodeccontext(AVStream* stream, AVCodec* codec, +AVCodecContext* guacenc_build_avcodeccontext(AVStream* stream, const AVCodec* codec, int bitrate, int width, int height, int gop_size, int qmax, int qmin, int pix_fmt, AVRational time_base) { @@ -250,7 +250,7 @@ AVCodecContext* guacenc_build_avcodeccontext(AVStream* stream, AVCodec* codec, } int guacenc_open_avcodec(AVCodecContext *avcodec_context, - AVCodec *codec, AVDictionary **options, + const AVCodec *codec, AVDictionary **options, AVStream* stream) { int ret = avcodec_open2(avcodec_context, codec, options); diff --git a/src/guacenc/ffmpeg-compat.h b/src/guacenc/ffmpeg-compat.h index 97d771eb..12cc828f 100644 --- a/src/guacenc/ffmpeg-compat.h +++ b/src/guacenc/ffmpeg-compat.h @@ -128,7 +128,7 @@ int guacenc_avcodec_encode_video(guacenc_video* video, AVFrame* frame); * The pointer to the configured AVCodecContext. * */ -AVCodecContext* guacenc_build_avcodeccontext(AVStream* stream, AVCodec* codec, +AVCodecContext* guacenc_build_avcodeccontext(AVStream* stream, const AVCodec* codec, int bitrate, int width, int height, int gop_size, int qmax, int qmin, int pix_fmt, AVRational time_base); @@ -158,7 +158,7 @@ AVCodecContext* guacenc_build_avcodeccontext(AVStream* stream, AVCodec* codec, * Zero on success, a negative value on error. */ int guacenc_open_avcodec(AVCodecContext *avcodec_context, - AVCodec *codec, AVDictionary **options, + const AVCodec *codec, AVDictionary **options, AVStream* stream); #endif diff --git a/src/guacenc/video.c b/src/guacenc/video.c index dd125302..12476486 100644 --- a/src/guacenc/video.c +++ b/src/guacenc/video.c @@ -48,7 +48,7 @@ guacenc_video* guacenc_video_alloc(const char* path, const char* codec_name, int width, int height, int bitrate) { - AVOutputFormat *container_format; + const AVOutputFormat *container_format; AVFormatContext *container_format_context; AVStream *video_stream; int ret; @@ -64,7 +64,7 @@ guacenc_video* guacenc_video_alloc(const char* path, const char* codec_name, container_format = container_format_context->oformat; /* Pull codec based on name */ - AVCodec* codec = avcodec_find_encoder_by_name(codec_name); + const AVCodec* codec = avcodec_find_encoder_by_name(codec_name); if (codec == NULL) { guacenc_log(GUAC_LOG_ERROR, "Failed to locate codec \"%s\".", codec_name);