Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/qtpalette.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/qtpalette.c b/libavformat/qtpalette.c
index 6544a551eb..a78b6af97a 100644
--- a/libavformat/qtpalette.c
+++ b/libavformat/qtpalette.c
@@ -51,7 +51,9 @@ int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette)
int color_count, color_start, color_end;
uint32_t a, r, g, b;
- if (greyscale) {
+ /* Ignore the greyscale bit for 1-bit video and sample
+ * descriptions containing a color table. */
+ if (greyscale && bit_depth > 1 && color_table_id) {
int color_index, color_dec;
/* compute the greyscale palette */
color_count = 1 << bit_depth;