mirror of https://git.ffmpeg.org/ffmpeg.git
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.
This commit is contained in:
parent
53688b62ca
commit
709e0291d6
|
@ -1779,6 +1779,8 @@ static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame)
|
||||||
int flags = desc ? desc->flags : 0;
|
int flags = desc ? desc->flags : 0;
|
||||||
if (num_planes == 1 && (flags & AV_PIX_FMT_FLAG_PAL))
|
if (num_planes == 1 && (flags & AV_PIX_FMT_FLAG_PAL))
|
||||||
num_planes = 2;
|
num_planes = 2;
|
||||||
|
if ((flags & FF_PSEUDOPAL) && frame->data[1])
|
||||||
|
num_planes = 2;
|
||||||
for (i = 0; i < num_planes; i++) {
|
for (i = 0; i < num_planes; i++) {
|
||||||
av_assert0(frame->data[i]);
|
av_assert0(frame->data[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue