Skip to content

Commit 21b89b2

Browse files
author
Clement Champetier
committed
PixelProperties: fixed getPixelFormatName with pixel format YUV420P
* AV_PIX_FMT_NONE = -1 * YUV420P = 0
1 parent ab34bde commit 21b89b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AvTranscoder/properties/PixelProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ std::string PixelProperties::getPixelName() const
3939

4040
std::string PixelProperties::getPixelFormatName() const
4141
{
42-
if(!_pixelFormat)
42+
if(_pixelFormat == AV_PIX_FMT_NONE)
4343
throw std::runtime_error("unable to find pixel format.");
4444

4545
const char* formatName = av_get_pix_fmt_name(_pixelFormat);

0 commit comments

Comments
 (0)