s->frame = av_frame_alloc();
if (!s->frame) {
- flashsv_decode_end(avctx);
return AVERROR(ENOMEM);
}
return 0;
}
-static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt,
+static int flashsv_decode_block(AVCodecContext *avctx, const AVPacket *avpkt,
GetBitContext *gb, int block_size,
int width, int height, int x_pos, int y_pos,
int blk_idx)
s->image_width, s->image_height, s->block_width, s->block_height,
h_blocks, v_blocks, h_part, v_part);
- if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
+ if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0)
return ret;
/* loop over all block columns */
}
#if CONFIG_FLASHSV_DECODER
-AVCodec ff_flashsv_decoder = {
+const AVCodec ff_flashsv_decoder = {
.name = "flashsv",
.long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v1"),
.type = AVMEDIA_TYPE_VIDEO,
.close = flashsv_decode_end,
.decode = flashsv_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
};
#endif /* CONFIG_FLASHSV_DECODER */
return 0;
}
-AVCodec ff_flashsv2_decoder = {
+const AVCodec ff_flashsv2_decoder = {
.name = "flashsv2",
.long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v2"),
.type = AVMEDIA_TYPE_VIDEO,
.close = flashsv2_decode_end,
.decode = flashsv_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
};
#endif /* CONFIG_FLASHSV2_DECODER */