X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fvideo_encoder.cpp;fp=nageru%2Fvideo_encoder.cpp;h=c75c4e3f365f851a0aa056fdebb3bacd7701bf9a;hb=f0db8fcc58dd66a7dfd019f99add721d8161b75a;hp=8138e76a42c99a7cf984d030ea7241423d99599d;hpb=bdc9f1ea04141e71906d486f9d254c3346835e72;p=nageru diff --git a/nageru/video_encoder.cpp b/nageru/video_encoder.cpp index 8138e76..c75c4e3 100644 --- a/nageru/video_encoder.cpp +++ b/nageru/video_encoder.cpp @@ -191,7 +191,7 @@ RefCountedGLsync VideoEncoder::end_frame() void VideoEncoder::open_output_stream() { AVFormatContext *avctx = avformat_alloc_context(); - avctx->oformat = oformat; + avctx->oformat = const_castoformat)>(oformat); // const_cast is a hack to work in FFmpeg both before and after 5.0. uint8_t *buf = (uint8_t *)av_malloc(MUX_BUFFER_SIZE); avctx->pb = avio_alloc_context(buf, MUX_BUFFER_SIZE, 1, this, nullptr, nullptr, nullptr);