ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / games / stepmania / 0001-fix-build-with-ffmpeg-4.patch
blob65686f5546c49401c3a6e1cca39b80749d26c602
1 From 33d928c54f4b35f8877cacd1e2c77b68b4dddc06 Mon Sep 17 00:00:00 2001
2 From: Zane van Iperen <zane@zanevaniperen.com>
3 Date: Sun, 7 Nov 2021 15:46:37 +1000
4 Subject: [PATCH] fix build with ffmpeg 4
6 ---
7 src/arch/MovieTexture/MovieTexture_FFMpeg.cpp | 5 +----
8 src/arch/MovieTexture/MovieTexture_FFMpeg.h | 22 +++++++++----------
9 2 files changed, 12 insertions(+), 15 deletions(-)
11 diff --git a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp
12 index bdf2356..f79fea2 100644
13 --- a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp
14 +++ b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp
15 @@ -445,7 +445,7 @@ RString MovieDecoder_FFMpeg::Open( RString sFile )
16 return "Couldn't find any video streams";
17 m_pStream = m_fctx->streams[stream_idx];
19 - if( m_pStream->codec->codec_id == avcodec::CODEC_ID_NONE )
20 + if( m_pStream->codec->codec_id == avcodec::AV_CODEC_ID_NONE )
21 return ssprintf( "Unsupported codec %08x", m_pStream->codec->codec_tag );
23 RString sError = OpenCodec();
24 @@ -474,9 +474,6 @@ RString MovieDecoder_FFMpeg::OpenCodec()
25 m_pStream->codec->idct_algo = FF_IDCT_AUTO;
26 m_pStream->codec->error_concealment = 3;
28 - if( pCodec->capabilities & CODEC_CAP_DR1 )
29 - m_pStream->codec->flags |= CODEC_FLAG_EMU_EDGE;
31 LOG->Trace("Opening codec %s", pCodec->name );
33 int ret = avcodec::avcodec_open2( m_pStream->codec, pCodec, NULL );
34 diff --git a/src/arch/MovieTexture/MovieTexture_FFMpeg.h b/src/arch/MovieTexture/MovieTexture_FFMpeg.h
35 index f4d25ef..32564e5 100644
36 --- a/src/arch/MovieTexture/MovieTexture_FFMpeg.h
37 +++ b/src/arch/MovieTexture/MovieTexture_FFMpeg.h
38 @@ -64,7 +64,7 @@ private:
40 avcodec::AVStream *m_pStream;
41 avcodec::AVFrame *m_Frame;
42 - avcodec::PixelFormat m_AVTexfmt; /* PixelFormat of output surface */
43 + avcodec::AVPixelFormat m_AVTexfmt; /* PixelFormat of output surface */
44 avcodec::SwsContext *m_swsctx;
46 avcodec::AVFormatContext *m_fctx;
47 @@ -90,7 +90,7 @@ static struct AVPixelFormat_t
49 int bpp;
50 uint32_t masks[4];
51 - avcodec::PixelFormat pf;
52 + avcodec::AVPixelFormat pf;
53 bool bHighColor;
54 bool bByteSwapOnLittleEndian;
55 MovieDecoderPixelFormatYCbCr YUV;
56 @@ -101,7 +101,7 @@ static struct AVPixelFormat_t
57 0x00FF0000,
58 0x0000FF00,
59 0x000000FF },
60 - avcodec::PIX_FMT_YUYV422,
61 + avcodec::AV_PIX_FMT_YUYV422,
62 false, /* N/A */
63 true,
64 PixelFormatYCbCr_YUYV422,
65 @@ -112,7 +112,7 @@ static struct AVPixelFormat_t
66 0x00FF0000,
67 0xFF000000,
68 0x000000FF },
69 - avcodec::PIX_FMT_BGRA,
70 + avcodec::AV_PIX_FMT_BGRA,
71 true,
72 true,
73 PixelFormatYCbCr_Invalid,
74 @@ -123,7 +123,7 @@ static struct AVPixelFormat_t
75 0x0000FF00,
76 0x000000FF,
77 0xFF000000 },
78 - avcodec::PIX_FMT_ARGB,
79 + avcodec::AV_PIX_FMT_ARGB,
80 true,
81 true,
82 PixelFormatYCbCr_Invalid,
83 @@ -135,7 +135,7 @@ static struct AVPixelFormat_t
84 0x0000FF00,
85 0x00FF0000,
86 0xFF000000 },
87 - avcodec::PIX_FMT_ABGR,
88 + avcodec::AV_PIX_FMT_ABGR,
89 true,
90 true,
91 PixelFormatYCbCr_Invalid,
92 @@ -146,7 +146,7 @@ static struct AVPixelFormat_t
93 0x00FF0000,
94 0x0000FF00,
95 0x000000FF },
96 - avcodec::PIX_FMT_RGBA,
97 + avcodec::AV_PIX_FMT_RGBA,
98 true,
99 true,
100 PixelFormatYCbCr_Invalid,
101 @@ -157,7 +157,7 @@ static struct AVPixelFormat_t
102 0x00FF00,
103 0x0000FF,
104 0x000000 },
105 - avcodec::PIX_FMT_RGB24,
106 + avcodec::AV_PIX_FMT_RGB24,
107 true,
108 true,
109 PixelFormatYCbCr_Invalid,
110 @@ -168,7 +168,7 @@ static struct AVPixelFormat_t
111 0x00FF00,
112 0xFF0000,
113 0x000000 },
114 - avcodec::PIX_FMT_BGR24,
115 + avcodec::AV_PIX_FMT_BGR24,
116 true,
117 true,
118 PixelFormatYCbCr_Invalid,
119 @@ -179,12 +179,12 @@ static struct AVPixelFormat_t
120 0x03E0,
121 0x001F,
122 0x0000 },
123 - avcodec::PIX_FMT_RGB555,
124 + avcodec::AV_PIX_FMT_RGB555,
125 false,
126 false,
127 PixelFormatYCbCr_Invalid,
129 - { 0, { 0,0,0,0 }, avcodec::PIX_FMT_NB, true, false, PixelFormatYCbCr_Invalid }
130 + { 0, { 0,0,0,0 }, avcodec::AV_PIX_FMT_NB, true, false, PixelFormatYCbCr_Invalid }
133 #endif
135 2.31.1