Fix runtime error in FFmpeg core when build with FFmpeg n5.1.2 and OpenGL ES (#14710)

* include libavcodec/version.h in video_buffer.h

Without this header video_decoder_context_t may be defined as different structure
in video_buffer.c and ffmpeg_core.c

* Fix the wrong data pointer for glTexImage2D when OpenGL ES enabled
This commit is contained in:
Rany 2022-12-08 19:45:07 +08:00 committed by GitHub
parent 2f7c29862c
commit 7b09cb2de4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -856,7 +856,7 @@ void CORE_PREFIX(retro_run)(void)
glBindTexture(GL_TEXTURE_2D, frames[1].tex);
#if defined(HAVE_OPENGLES)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
media.width, media.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
media.width, media.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, video_frame_temp_buffer);
#else
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
media.width, media.height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);

View File

@ -20,6 +20,7 @@
extern "C" {
#endif
#include <libavcodec/version.h>
#include <libavutil/frame.h>
#include <libswscale/swscale.h>