bd31f9f307
This is more correct and needed with latest ffmpeg patches from jc Signed-off-by: Matthias Reichl <hias@horus.com>
43 lines
2.1 KiB
Diff
43 lines
2.1 KiB
Diff
From 6f2cfc3cfa5a927be677cff797812b0346d50a86 Mon Sep 17 00:00:00 2001
|
|
From: Dom Cobley <popcornmix@gmail.com>
|
|
Date: Fri, 30 Sep 2022 17:59:55 +0100
|
|
Subject: [PATCH] DVDVideoCodecDRMPRIME: use AV_PIX_FMT_DRM_PRIME for frames
|
|
input to ffmpeg
|
|
|
|
This is more correct and necessary with more recent trees from jc
|
|
---
|
|
.../VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
|
index b931ea2b57..e7aee526da 100644
|
|
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
|
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
|
@@ -652,13 +652,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
|
|
|
const AVFilter* srcFilter = avfilter_get_by_name("buffer");
|
|
const AVFilter* outFilter = avfilter_get_by_name("buffersink");
|
|
- enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE };
|
|
+ enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_NONE };
|
|
|
|
std::string args = StringUtils::Format("video_size={}x{}:pix_fmt={}:time_base={}/{}:"
|
|
"pixel_aspect={}/{}:sws_param=flags=2",
|
|
m_pCodecContext->width,
|
|
m_pCodecContext->height,
|
|
- m_pCodecContext->pix_fmt,
|
|
+ AV_PIX_FMT_DRM_PRIME,
|
|
m_pCodecContext->time_base.num ?
|
|
m_pCodecContext->time_base.num : 1,
|
|
m_pCodecContext->time_base.num ?
|
|
@@ -810,6 +810,7 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
|
|
m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor);
|
|
}
|
|
|
|
+ m_pFrame->format = AV_PIX_FMT_DRM_PRIME;
|
|
int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);
|
|
if (ret < 0)
|
|
{
|
|
--
|
|
2.34.1
|
|
|