Commit 2acfa869 authored by Guillaume Roguez's avatar Guillaume Roguez

#28513: fix PixelFormat deprecation.

This enum is now AVPixelFormat, but Ubuntu's libav doesn't define it yet,
causing build error.
parent aace00fc
......@@ -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__
......@@ -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)
......
......@@ -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_) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment