Skip to content

Commit 841fa76

Browse files
author
Clement Champetier
committed
VideoStreamPropertiers: fix pixFmt
In ffmpeg, PixelFormat = 0 corresponds to yuv420p.
1 parent 323f28b commit 841fa76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AvTranscoder/Metadatas/VideoStreamProperties.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ VideoProperties videoStreamInfo(
281281
const AVPixFmtDescriptor* pixFmt = av_pix_fmt_desc_get( codec_context->pix_fmt );
282282
#else
283283
const AVPixFmtDescriptor* pixFmt = NULL;
284-
if( codec_context->pix_fmt > 0 && codec_context->pix_fmt < PIX_FMT_NB )
284+
if( codec_context->pix_fmt >= 0 && codec_context->pix_fmt < PIX_FMT_NB )
285285
pixFmt = &av_pix_fmt_descriptors[ codec_context->pix_fmt ];
286286
#endif
287287

0 commit comments

Comments
 (0)