summaryrefslogtreecommitdiff
path: root/media-video/ffmpegthumbnailer/files/ffmpeg5-7.patch
blob: ac1eb3c25423b68bd9340ecf44bf1f1506e6f0df (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
From 4f74f83a009fa2b3f3d546adb24d4f1406910007 Mon Sep 17 00:00:00 2001
From: Zane van Iperen <zane@zanevaniperen.com>
Date: Mon, 15 Mar 2021 17:49:03 +1000
Subject: [PATCH] lib/moviedecoder: codec -> codecpar

---
 libffmpegthumbnailer/moviedecoder.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libffmpegthumbnailer/moviedecoder.cpp b/libffmpegthumbnailer/moviedecoder.cpp
index 0b7a280..e58904e 100644
--- a/libffmpegthumbnailer/moviedecoder.cpp
+++ b/libffmpegthumbnailer/moviedecoder.cpp
@@ -145,10 +145,10 @@ int32_t MovieDecoder::findPreferedVideoStream(bool preferEmbeddedMetadata)
     for (unsigned int i = 0; i < m_pFormatContext->nb_streams; ++i)
     {
         AVStream *stream = m_pFormatContext->streams[i];
-        auto ctx = m_pFormatContext->streams[i]->codec;
-        if (ctx->codec_type == AVMEDIA_TYPE_VIDEO)
+        auto par = m_pFormatContext->streams[i]->codecpar;
+        if (par->codec_type == AVMEDIA_TYPE_VIDEO)
         {
-            if (!preferEmbeddedMetadata || !isStillImageCodec(ctx->codec_id))
+            if (!preferEmbeddedMetadata || !isStillImageCodec(par->codec_id))
             {
                 videoStreams.push_back(i);
                 continue;