diff --git a/daemon/src/video/libav_deps.h b/daemon/src/video/libav_deps.h index 27f65bdfe3add99a690d3a734f387f9eb8da2868..371483e0e360ace0daf38b791f7bae92b43a327a 100644 --- a/daemon/src/video/libav_deps.h +++ b/daemon/src/video/libav_deps.h @@ -51,4 +51,8 @@ extern "C" { #define HAVE_SDP_CUSTOM_IO LIBAVFORMAT_VERSION_CHECK(54,20,3,59,103) +#if (LIBAVUTIL_VERSION_MAJOR < 53) && !defined(FF_API_PIX_FMT) +#define AVPixelFormat PixelFormat +#endif + #endif // __LIBAV_DEPS_H__ diff --git a/daemon/src/video/video_base.cpp b/daemon/src/video/video_base.cpp index 4ccbf7ad97e32f694516cec9603ae129ce0cc6bb..2fca184d0f0879c2f7b6e80c5ad814ad7deb7510 100644 --- a/daemon/src/video/video_base.cpp +++ b/daemon/src/video/video_base.cpp @@ -129,13 +129,13 @@ void VideoFrame::setDestination(void *data) } avpicture_fill((AVPicture *) frame_, (uint8_t *) data, - (PixelFormat) frame_->format, frame_->width, + (AVPixelFormat) frame_->format, frame_->width, frame_->height); } size_t VideoFrame::getSize() { - return avpicture_get_size((PixelFormat) frame_->format, + return avpicture_get_size((AVPixelFormat) frame_->format, frame_->width, frame_->height); } @@ -143,7 +143,7 @@ size_t VideoFrame::getSize() size_t VideoFrame::getSize(int width, int height, int format) { return avpicture_get_size( - (PixelFormat) libav_utils::libav_pixel_format(format), width, height); + (AVPixelFormat) libav_utils::libav_pixel_format(format), width, height); } int VideoFrame::blit(VideoFrame &src, int xoff, int yoff) diff --git a/daemon/src/video/video_scaler.cpp b/daemon/src/video/video_scaler.cpp index 7f41efc88d56fd8d46aa9a2b0895b3d01b2a7620..15b6a94a37f8a23d959cd26827d2dbbc5f4dd2d2 100644 --- a/daemon/src/video/video_scaler.cpp +++ b/daemon/src/video/video_scaler.cpp @@ -47,10 +47,10 @@ void VideoScaler::scale(VideoFrame &input, VideoFrame &output) ctx_ = sws_getCachedContext(ctx_, input_frame->width, input_frame->height, - (PixelFormat) input_frame->format, + (AVPixelFormat) input_frame->format, output_frame->width, output_frame->height, - (PixelFormat) output_frame->format, + (AVPixelFormat) output_frame->format, mode_, NULL, NULL, NULL); if (!ctx_) {