1
0
Fork 0
forked from eden-emu/eden

Fix video decoding on newer versions of FFmpeg (#155)

Fixes video decoding issues and enables compatibility with newer versions of FFmpeg.

Co-authored-by: MaranBr <maranbr@outlook.com>
Reviewed-on: eden-emu/eden#155
This commit is contained in:
MaranBr 2025-06-04 19:06:48 +00:00
parent 2d0f15ccac
commit 6397bb0809
2 changed files with 15 additions and 175 deletions

View file

@ -22,7 +22,7 @@ extern "C" {
#include <libavcodec/avcodec.h>
#include <libavutil/opt.h>
#ifndef ANDROID
#include <libavcodec/codec.h>
#include <libavcodec/codec_internal.h>
#endif
#if defined(__GNUC__) || defined(__clang__)
@ -106,7 +106,11 @@ public:
}
bool IsInterlaced() const {
return m_frame->interlaced_frame != 0;
#if defined(FF_API_INTERLACED_FRAME) || LIBAVUTIL_VERSION_MAJOR >= 59
return m_frame->flags & AV_FRAME_FLAG_INTERLACED;
#else
return m_frame->interlaced_frame;
#endif
}
bool IsHardwareDecoded() const {