Skip to content

Commit 5311d7c

Browse files
author
Marc-Antoine Arnaud
committed
change undefined flags (deprecated before ffmpeg 2.0)
1 parent 103c33f commit 5311d7c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/AvTranscoder/properties/PixelProperties.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ EComponentType PixelProperties::getColorComponents() const
101101
{
102102
return eComponentGray;
103103
}
104-
else if(_pixelDesc->flags & PIX_FMT_PAL || _pixelDesc->flags & PIX_FMT_RGB)
104+
else if(_pixelDesc->flags & AV_PIX_FMT_FLAG_PAL || _pixelDesc->flags & AV_PIX_FMT_FLAG_RGB)
105105
{
106106
return eComponentRgb;
107107
}
@@ -154,7 +154,7 @@ bool PixelProperties::isBigEndian() const
154154
{
155155
if(!_pixelDesc)
156156
throw std::runtime_error("unable to find pixel description.");
157-
return (_pixelDesc->flags & PIX_FMT_BE) == PIX_FMT_BE;
157+
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_BE) == AV_PIX_FMT_FLAG_BE;
158158
}
159159

160160
bool PixelProperties::hasAlpha() const
@@ -163,7 +163,7 @@ bool PixelProperties::hasAlpha() const
163163
throw std::runtime_error("unable to find pixel description.");
164164

165165
#if LIBAVCODEC_VERSION_MAJOR > 53
166-
return (_pixelDesc->flags & PIX_FMT_ALPHA) == PIX_FMT_ALPHA;
166+
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_ALPHA) == AV_PIX_FMT_FLAG_ALPHA;
167167
#else
168168
return false;
169169
#endif
@@ -173,35 +173,35 @@ bool PixelProperties::isPlanar() const
173173
{
174174
if(!_pixelDesc)
175175
throw std::runtime_error("unable to find pixel description.");
176-
return (_pixelDesc->flags & PIX_FMT_PLANAR) == PIX_FMT_PLANAR;
176+
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_PLANAR) == AV_PIX_FMT_FLAG_PLANAR;
177177
}
178178

179179
bool PixelProperties::isIndexedColors() const
180180
{
181181
if(!_pixelDesc)
182182
throw std::runtime_error("unable to find pixel description.");
183-
return (_pixelDesc->flags & PIX_FMT_PAL) == PIX_FMT_PAL;
183+
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_PAL) == AV_PIX_FMT_FLAG_PAL;
184184
}
185185

186186
bool PixelProperties::isBitWisePacked() const
187187
{
188188
if(!_pixelDesc)
189189
throw std::runtime_error("unable to find pixel description.");
190-
return (_pixelDesc->flags & PIX_FMT_BITSTREAM) == PIX_FMT_BITSTREAM;
190+
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_BITSTREAM) == AV_PIX_FMT_FLAG_BITSTREAM;
191191
}
192192

193193
bool PixelProperties::isHardwareAccelerated() const
194194
{
195195
if(!_pixelDesc)
196196
throw std::runtime_error("unable to find pixel description.");
197-
return (_pixelDesc->flags & PIX_FMT_HWACCEL) == PIX_FMT_HWACCEL;
197+
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_HWACCEL) == AV_PIX_FMT_FLAG_HWACCEL;
198198
}
199199

200200
bool PixelProperties::isRgbPixelData() const
201201
{
202202
if(!_pixelDesc)
203203
throw std::runtime_error("unable to find pixel description.");
204-
return (_pixelDesc->flags & PIX_FMT_RGB) == PIX_FMT_RGB;
204+
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_RGB) == AV_PIX_FMT_FLAG_RGB;
205205
}
206206

207207
bool PixelProperties::isPseudoPaletted() const
@@ -210,7 +210,7 @@ bool PixelProperties::isPseudoPaletted() const
210210
throw std::runtime_error("unable to find pixel description.");
211211

212212
#if LIBAVCODEC_VERSION_MAJOR > 53
213-
return (_pixelDesc->flags & PIX_FMT_PSEUDOPAL) == PIX_FMT_PSEUDOPAL;
213+
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) == AV_PIX_FMT_FLAG_PSEUDOPAL;
214214
#else
215215
return false;
216216
#endif

0 commit comments

Comments
 (0)