diff --git a/libavcodec/yop.c b/libavcodec/yop.c index 3959ada251..fd7f090839 100644 --- a/libavcodec/yop.c +++ b/libavcodec/yop.c @@ -206,6 +206,9 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return ret; } + if (!avctx->frame_number) + memset(s->frame.data[1], 0, AVPALETTE_SIZE); + s->dstbuf = s->frame.data[0]; s->dstptr = s->frame.data[0]; s->srcptr = avpkt->data + 4; diff --git a/tests/ref/fate/yop b/tests/ref/fate/yop index 57f565d5f8..1a5666069e 100644 --- a/tests/ref/fate/yop +++ b/tests/ref/fate/yop @@ -1,7 +1,7 @@ #tb 0: 1/12 0, 0, 0, 1, 302760, 0x78939253 0, 1, 1, 1, 302760, 0x534f5253 -0, 2, 2, 1, 302760, 0xe991aa82 -0, 3, 3, 1, 302760, 0xc34b20bd -0, 4, 4, 1, 302760, 0x461d29a1 +0, 2, 2, 1, 302760, 0x25eaa782 +0, 3, 3, 1, 302760, 0x60861c3d +0, 4, 4, 1, 302760, 0x43552521 0, 5, 5, 1, 302760, 0x45abca02