int nb_tiles = bytestream2_get_le16(gb);
int h = avctx->height - 1;
+ if ((avctx->width / 4 + 1) * (avctx->height / 4 + 1) < nb_tiles)
+ return;
+
for (int i = 0; i < nb_tiles; i++) {
int y = bytestream2_get_byte(gb);
int x = bytestream2_get_byte(gb);
int nb_tiles = bytestream2_get_le16(gb);
int h = avctx->height - 1;
+ if ((avctx->width / tile_width + 1) * (avctx->height / tile_height + 1) < nb_tiles)
+ return;
+
for (int i = 0; i < nb_tiles; i++) {
int y = bytestream2_get_byte(gb);
int x = bytestream2_get_byte(gb);
return 0;
}
+static void decode_flush(AVCodecContext *avctx)
+{
+ ARBCContext *s = avctx->priv_data;
+
+ av_frame_unref(s->prev_frame);
+}
+
static av_cold int decode_close(AVCodecContext *avctx)
{
ARBCContext *s = avctx->priv_data;
.priv_data_size = sizeof(ARBCContext),
.init = decode_init,
.decode = decode_frame,
+ .flush = decode_flush,
.close = decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,