diff options
Diffstat (limited to 'video/img_format.c')
-rw-r--r-- | video/img_format.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/img_format.c b/video/img_format.c index b3d0c8bd91..9e396832bf 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -233,6 +233,11 @@ struct mp_imgfmt_desc mp_imgfmt_get_desc(int mpfmt) desc.bytes[p] = desc.bpp[p] / 8; } + // PSEUDOPAL is a complete braindeath nightmare, however it seems various + // parts of FFmpeg expect that it has a palette allocated. + if (pd->flags & (PIX_FMT_PAL | PIX_FMT_PSEUDOPAL)) + desc.flags |= MP_IMGFLAG_PAL; + if ((desc.flags & MP_IMGFLAG_YUV) && (desc.flags & MP_IMGFLAG_BYTE_ALIGNED)) { bool same_depth = true; |