0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-01-09 13:45:21 +00:00
Lakka-LibreELEC/packages/multimedia/ffmpeg/patches/L4T/0034-codecs-nvv4l2-more-API-renames.patch
GavinDarkglider 600e246a94 L4T/Ayn: upstream changes from 5.x
Lakka 5.x Switch changes (#1853)
Lakka v5.x switchroot 5.1.2 (#1871)
Fix Switch Issue's in upstream 5.x (#1888)
Minor Switch Changes (#1893)
Lakka v5.x switch 3 (#1895)
Lakka v5.x switch 4 (#1898)
L4T: Xorg-server: Fix build issue (#1924)
Switch: remove ra patch
Lakka v5.x switch 6 (#1926)
Cleanups, More LibreELEC Stuff, more permission fixes, Misc switch stuff. (#1930)
Switch: U-Boot: bump version to 2024-NX02 (#1946)

L4T/Ayn post-upstreaming fixes
- retroarch_joypad_autoconfig: remove spaces from file names
- retroarch: remove Switch specific patch merged upstream
- libXv: move to L4T packages folder (package removed in upstream)
- bring some packages from v5.x to L4T packages
- ffmpeg: remove vulkan
- remove stella core from Switch build (missing C++ headers)
- Ayn/Odin: use proper kernel arg to not hide kernel messages in console
- connman: add wpa_supplicant support back
2024-05-21 15:41:36 +02:00

59 lines
2.0 KiB
Diff

From 08ff68f2fb3175157a46a8dfb880f58870ac6b9e Mon Sep 17 00:00:00 2001
From: theofficialgman <28281419+theofficialgman@users.noreply.github.com>
Date: Wed, 17 Jan 2024 22:17:55 -0500
Subject: [PATCH 34/39] codecs: nvv4l2: more API renames
---
libavcodec/nvv4l2_dec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/libavcodec/nvv4l2_dec.c b/libavcodec/nvv4l2_dec.c
index a92b191b24..5ccea0830b 100644
--- a/libavcodec/nvv4l2_dec.c
+++ b/libavcodec/nvv4l2_dec.c
@@ -988,6 +988,8 @@ static NvCodingType map_avcodec_id(enum AVCodecID id)
static int nvv4l2dec_codec_fallback(AVCodecContext *avctx)
{
+ const FFCodec *codec2;
+
av_log(avctx, AV_LOG_WARNING, "Falling back to software decoding.\n");
switch (avctx->codec_id) {
@@ -1005,10 +1007,12 @@ static int nvv4l2dec_codec_fallback(AVCodecContext *avctx)
return AVERROR_BUG;
}
+ codec2 = ffcodec(avctx->codec);
+
av_opt_free(avctx->priv_data);
- if (avctx->codec->priv_data_size > 0) {
- avctx->priv_data = av_mallocz(avctx->codec->priv_data_size);
+ if (codec2->priv_data_size > 0) {
+ avctx->priv_data = av_mallocz(codec2->priv_data_size);
if (!avctx->priv_data)
return AVERROR(ENOMEM);
}
@@ -1017,7 +1021,7 @@ static int nvv4l2dec_codec_fallback(AVCodecContext *avctx)
&& !(avctx->internal->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))) {
ff_thread_init(avctx);
}
- if (!HAVE_THREADS && !(avctx->codec->caps_internal & FF_CODEC_CAP_AUTO_THREADS))
+ if (!HAVE_THREADS && !(codec2->caps_internal & FF_CODEC_CAP_AUTO_THREADS))
avctx->thread_count = 1;
if (avctx->codec->priv_class) {
@@ -1025,7 +1029,7 @@ static int nvv4l2dec_codec_fallback(AVCodecContext *avctx)
av_opt_set_defaults(avctx->priv_data);
}
- return avctx->codec->init(avctx);
+ return codec2->init(avctx);
}
static int nvv4l2dec_init(AVCodecContext *avctx)
--
2.25.1