diff options
author | wm4 <nfxjfg@googlemail.com> | 2018-04-04 18:07:03 +0200 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2018-04-05 16:58:40 +0200 |
commit | 709e0291d659d089527ec7c048f9b2608183df64 (patch) | |
tree | a0f394ada4d046e20937b4ced18ddd8034b0eb9b /libavcodec | |
parent | 53688b62ca96ad9a3b0e7d201caca61c79a68648 (diff) | |
download | ffmpeg-streaming-709e0291d659d089527ec7c048f9b2608183df64.zip ffmpeg-streaming-709e0291d659d089527ec7c048f9b2608183df64.tar.gz |
avcodec/decode: fix warning when decoding pseudo paletted formats
The pseudo palette allocation is optional now. But if it's still
allocated (like the internal get_buffer2 implementation does, for
compatibility), it shouldn't print a warning.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/decode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index d883a5f..421a8f1 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -1779,6 +1779,8 @@ static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame) int flags = desc ? desc->flags : 0; if (num_planes == 1 && (flags & AV_PIX_FMT_FLAG_PAL)) num_planes = 2; + if ((flags & FF_PSEUDOPAL) && frame->data[1]) + num_planes = 2; for (i = 0; i < num_planes; i++) { av_assert0(frame->data[i]); } |