AudioEncoder::AudioEncoder(const string &codec_name, int bit_rate, const AVOutputFormat *oformat)
{
- AVCodec *codec = avcodec_find_encoder_by_name(codec_name.c_str());
+ const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.c_str());
if (codec == nullptr) {
fprintf(stderr, "ERROR: Could not find codec '%s'\n", codec_name.c_str());
abort();