--- libvideogfx-git-180824.old/libvideogfx/graphics/fileio/ffmpeg.cc +++ libvideogfx-git-180824/libvideogfx/graphics/fileio/ffmpeg.cc @@ -35,7 +35,7 @@ #endif extern "C" { -#ifdef HAVE_FFMPEG_AVCODEC_H +#ifdef HAVE_FFMPEG_AVCODEC_H_BACON #include #else #include @@ -135,17 +135,17 @@ // alloc frame storage - frame = avcodec_alloc_frame(); + frame = alloc_frame(); if (frame==NULL) return false; - frameRGB = avcodec_alloc_frame(); + frameRGB = alloc_frame(); if (frameRGB==NULL) return false; - int nBytesPerFrame = avpicture_get_size(PIX_FMT_RGB24, codecCtx->width, codecCtx->height); + int nBytesPerFrame = avpicture_get_size(AV_PIX_FMT_RGB24, codecCtx->width, codecCtx->height); buffer = static_cast(av_malloc(nBytesPerFrame)); - avpicture_fill(reinterpret_cast(frameRGB), buffer, PIX_FMT_RGB24, codecCtx->width, codecCtx->height); + avpicture_fill(reinterpret_cast(frameRGB), buffer, AV_PIX_FMT_RGB24, codecCtx->width, codecCtx->height); // preload first frame @@ -239,7 +239,7 @@ struct SwsContext* swsContext = sws_getContext(codecCtx->width, codecCtx->height, codecCtx->pix_fmt, - codecCtx->width, codecCtx->height, PIX_FMT_RGB24, SWS_POINT, NULL, NULL, NULL); + codecCtx->width, codecCtx->height, AV_PIX_FMT_RGB24, SWS_POINT, NULL, NULL, NULL); sws_scale(swsContext, frame->data, frame->linesize, 0, codecCtx->height, frameRGB->data, frameRGB->linesize);