return ret;
}
- if ((ret = ff_reget_buffer(avctx, s->current_frame)) < 0)
+ if ((ret = ff_reget_buffer(avctx, s->current_frame, 0)) < 0)
return ret;
bytestream2_init(gb, avpkt->data, avpkt->size);
uint32_t clr, *dst = (uint32_t *)s->current_frame->data[0];
int y;
+ if (bytestream2_get_bytes_left(gb) < 3)
+ return AVERROR_INVALIDDATA;
+
frame->key_frame = 1;
bytestream2_skip(gb, 1);
if (avctx->bits_per_coded_sample == 16) {
return 0;
}
-AVCodec ff_scpr_decoder = {
+const AVCodec ff_scpr_decoder = {
.name = "scpr",
.long_name = NULL_IF_CONFIG_SMALL("ScreenPressor"),
.type = AVMEDIA_TYPE_VIDEO,