From 1ae42e664e1f3c915d186ae00aa2c8018b998708 Mon Sep 17 00:00:00 2001 From: Zane van Iperen 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 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)