Fixed some deprecation warnings in VideoFFmpegComponent.cpp when building with FFmpeg 6.1 or higher

This commit is contained in:
Leon Styhre 2024-03-10 17:24:02 +01:00
parent d5b5bb5ac5
commit 8a91c558db

View file

@ -744,10 +744,7 @@ void VideoFFmpegComponent::readFrames()
destFrame->pict_type = mVideoFrame->pict_type; destFrame->pict_type = mVideoFrame->pict_type;
destFrame->chroma_location = destFrame->chroma_location =
mVideoFrame->chroma_location; mVideoFrame->chroma_location;
#if LIBAVUTIL_VERSION_MAJOR > 58 || (LIBAVUTIL_VERSION_MAJOR == 58 && LIBAVUTIL_VERSION_MINOR >= 29) #if LIBAVUTIL_VERSION_MAJOR < 58 || (LIBAVUTIL_VERSION_MAJOR == 58 && LIBAVUTIL_VERSION_MINOR < 29)
// TODO: Figure out how this should be done in >= 6.1
destFrame->pkt_pos = mVideoFrame->pkt_pos;
#else
destFrame->pkt_pos = mVideoFrame->pkt_pos; destFrame->pkt_pos = mVideoFrame->pkt_pos;
#endif #endif
#if LIBAVUTIL_VERSION_MAJOR < 58 #if LIBAVUTIL_VERSION_MAJOR < 58
@ -755,10 +752,7 @@ void VideoFFmpegComponent::readFrames()
#else #else
destFrame->duration = mVideoFrame->duration; destFrame->duration = mVideoFrame->duration;
#endif #endif
#if LIBAVUTIL_VERSION_MAJOR > 58 || (LIBAVUTIL_VERSION_MAJOR == 58 && LIBAVUTIL_VERSION_MINOR >= 29) #if LIBAVUTIL_VERSION_MAJOR < 58 || (LIBAVUTIL_VERSION_MAJOR == 58 && LIBAVUTIL_VERSION_MINOR < 29)
// TODO: Figure out how this should be done in >= 6.1
destFrame->pkt_size = mVideoFrame->pkt_size;
#else
destFrame->pkt_size = mVideoFrame->pkt_size; destFrame->pkt_size = mVideoFrame->pkt_size;
#endif #endif
} }