mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-11-28 01:34:40 +00:00
66e50e96b9
* L4T: Fix/Enable NVV4l2 decoder in libreelec builds. * L4T: LibreELEC: Allow Kodi to run as root * L4T: Small Tree Cleanup * Bluez: Switch: LibreELEC: Fix fast connect on all switch builds, not just lakka. * L4T: Finish ffmpeg 6.0 patchset * L4T: Fix building newer libcec for switch * L4T: switch-bsp: Update dock hotplug to check distro stuff, before integrating CEC and bump version.
59 lines
2.0 KiB
Diff
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
|
|
|