Commit 66c22a50 authored by Niklas Haas's avatar Niklas Haas
Browse files

utils/libav: make robust against AV_PIX_FMT_NONE

(And other invalid values of `pixfmt`)
parent d503d9dd
......@@ -250,7 +250,8 @@ static inline int pl_plane_data_from_pixfmt(struct pl_plane_data out_data[4],
struct pl_plane_data aligned_data[4];
struct pl_bit_encoding bits;
bool first;
if (!desc || planes < 0) // e.g. AV_PIX_FMT_NONE
return 0;
if (desc->flags & AV_PIX_FMT_FLAG_BE) {
// Big endian formats are almost definitely not supported in any
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment