summaryrefslogtreecommitdiff
path: root/libavcodec/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/decode.c')
-rw-r--r--libavcodec/decode.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 40c8a8855c..d883a5f9fc 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1614,7 +1614,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
pic->linesize[i] = 0;
}
if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
+ ((desc->flags & FF_PSEUDOPAL) && pic->data[1]))
avpriv_set_systematic_pal2((uint32_t *)pic->data[1], pic->format);
if (s->debug & FF_DEBUG_BUFFERS)
@@ -1782,9 +1782,6 @@ static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame)
for (i = 0; i < num_planes; i++) {
av_assert0(frame->data[i]);
}
- // For now do not enforce anything for palette of pseudopal formats
- if (num_planes == 1 && (flags & AV_PIX_FMT_FLAG_PSEUDOPAL))
- num_planes = 2;
// For formats without data like hwaccel allow unused pointers to be non-NULL.
for (i = num_planes; num_planes > 0 && i < FF_ARRAY_ELEMS(frame->data); i++) {
if (frame->data[i])