summaryrefslogtreecommitdiff
path: root/media-video/ffmpegthumbnailer/files/ffmpeg5-5.patch
blob: e2a131b31ebcf45e712a21be82f57e5fd4299442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 1ae42e664e1f3c915d186ae00aa2c8018b998708 Mon Sep 17 00:00:00 2001
From: Zane van Iperen <zane@zanevaniperen.com>
Date: Mon, 15 Mar 2021 17:30:21 +1000
Subject: [PATCH] lib/moviedecoder: remove use of AVBufferSinkParams

---
 libffmpegthumbnailer/moviedecoder.cpp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/libffmpegthumbnailer/moviedecoder.cpp b/libffmpegthumbnailer/moviedecoder.cpp
index ac3e5b9..dece668 100644
--- a/libffmpegthumbnailer/moviedecoder.cpp
+++ b/libffmpegthumbnailer/moviedecoder.cpp
@@ -379,11 +379,6 @@ std::string MovieDecoder::createScaleString(const std::string& sizeString, bool
 
 void MovieDecoder::initializeFilterGraph(const AVRational& timeBase, const std::string& size, bool maintainAspectRatio)
 {
-    static const AVPixelFormat pixelFormats[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE };
-
-    auto del = [] (AVBufferSinkParams* p) { av_freep(p); };
-    std::unique_ptr<AVBufferSinkParams, decltype(del)> buffersinkParams(av_buffersink_params_alloc(), del);
-
     m_pFilterGraph = avfilter_graph_alloc();
     assert(m_pFilterGraph);
 
@@ -395,10 +390,8 @@ void MovieDecoder::initializeFilterGraph(const AVRational& timeBase, const std::
 
     checkRc(avfilter_graph_create_filter(&m_pFilterSource, avfilter_get_by_name("buffer"), "thumb_buffer", ss.str().c_str(), nullptr, m_pFilterGraph),
             "Failed to create filter source");
-    buffersinkParams->pixel_fmts = pixelFormats;
-    checkRc(avfilter_graph_create_filter(&m_pFilterSink, avfilter_get_by_name("buffersink"), "thumb_buffersink", nullptr, buffersinkParams.get(), m_pFilterGraph),
+    checkRc(avfilter_graph_create_filter(&m_pFilterSink, avfilter_get_by_name("buffersink"), "thumb_buffersink", nullptr, nullptr, m_pFilterGraph),
             "Failed to create filter sink");
-    buffersinkParams.release();
 
     AVFilterContext* yadifFilter = nullptr;
     if (m_pFrame->interlaced_frame != 0)