From: Steinar H. Gunderson Date: Sat, 28 Oct 2017 11:01:15 +0000 (+0200) Subject: Fix compilation with older FFmpeg. X-Git-Tag: 1.6.3~3 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=8f86bc5c54efd2763deb5e34e69512db650e5658 Fix compilation with older FFmpeg. --- diff --git a/ffmpeg_capture.cpp b/ffmpeg_capture.cpp index d2b1cb5..1ffa9d5 100644 --- a/ffmpeg_capture.cpp +++ b/ffmpeg_capture.cpp @@ -685,7 +685,7 @@ void FFmpegCapture::convert_audio(const AVFrame *audio_avframe, FrameAllocator:: uint8_t *data = audio_frame->data + audio_frame->len; int out_samples = avresample_convert(resampler, &data, 0, num_samples_room, - audio_avframe->data, audio_avframe->linesize[0], audio_avframe->nb_samples); + const_cast(audio_avframe->data), audio_avframe->linesize[0], audio_avframe->nb_samples); if (out_samples < 0) { fprintf(stderr, "Audio conversion failed.\n"); exit(1);