diff options
author | wm4 <wm4@nowhere> | 2015-11-01 14:11:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-01 14:11:43 +0100 |
commit | cdeb0e4c72cd9c0ebed233bcee80d19250d57550 (patch) | |
tree | 0d4ffd353b03c07dc0d431ff3639f49d50385d15 /video | |
parent | 8fd63c8f0cfb6c95a534f61942a5d0a0f5623b25 (diff) | |
download | mpv-cdeb0e4c72cd9c0ebed233bcee80d19250d57550.tar.bz2 mpv-cdeb0e4c72cd9c0ebed233bcee80d19250d57550.tar.xz |
video: fix playback of pal8
PAL8 is the only format that is RGB, has only 1 component, is byte-
aligned. It was accidentally detected by the GBRP case as planar RGB.
(It would have been ok if it were gray; what ruins it is that it's
actually paletted, and the color values do not correspond to colors (but
palette entries).
Pseudo-pal formats are ok; in fact AV_PIX_FMT_GRAY is rightfully marked
as MP_IMGFLAG_YUV_P.
Diffstat (limited to 'video')
-rw-r--r-- | video/img_format.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/img_format.c b/video/img_format.c index c2bbf6bb01..332bf3676f 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -232,7 +232,8 @@ struct mp_imgfmt_desc mp_imgfmt_get_desc(int mpfmt) desc.flags |= MP_IMGFLAG_PAL; if ((desc.flags & (MP_IMGFLAG_YUV | MP_IMGFLAG_RGB)) - && (desc.flags & MP_IMGFLAG_BYTE_ALIGNED)) + && (desc.flags & MP_IMGFLAG_BYTE_ALIGNED) + && !(pd->flags & AV_PIX_FMT_FLAG_PAL)) { bool same_depth = true; for (int p = 0; p < desc.num_planes; p++) { |