mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
avcodec/hevc_refs: don't use the frame's AVBufferRef sizes when initializing planes
Use the actual plane sizes instead. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
f5d67469b0
commit
3aeeee1597
@ -401,9 +401,9 @@ static HEVCFrame *generate_missing_ref(HEVCContext *s, int poc)
|
|||||||
|
|
||||||
if (!s->avctx->hwaccel) {
|
if (!s->avctx->hwaccel) {
|
||||||
if (!s->ps.sps->pixel_shift) {
|
if (!s->ps.sps->pixel_shift) {
|
||||||
for (i = 0; frame->frame->buf[i]; i++)
|
for (i = 0; frame->frame->data[i]; i++)
|
||||||
memset(frame->frame->buf[i]->data, 1 << (s->ps.sps->bit_depth - 1),
|
memset(frame->frame->data[i], 1 << (s->ps.sps->bit_depth - 1),
|
||||||
frame->frame->buf[i]->size);
|
frame->frame->linesize[i] * AV_CEIL_RSHIFT(s->ps.sps->height, s->ps.sps->vshift[i]));
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; frame->frame->data[i]; i++)
|
for (i = 0; frame->frame->data[i]; i++)
|
||||||
for (y = 0; y < (s->ps.sps->height >> s->ps.sps->vshift[i]); y++) {
|
for (y = 0; y < (s->ps.sps->height >> s->ps.sps->vshift[i]); y++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user