RASCContext *s = avctx->priv_data;
uint8_t *dst = frame->data[0];
+ if (!dst)
+ return;
+
for (int y = 0; y < avctx->height; y++) {
memset(dst, 0, avctx->width * s->bpp);
dst += frame->linesize[0];
}
static int decode_fint(AVCodecContext *avctx,
- AVPacket *avpkt, unsigned size)
+ const AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
clear_plane(avctx, s->frame1);
return 0;
}
+ if (bytestream2_get_bytes_left(gb) < 72)
+ return AVERROR_INVALIDDATA;
bytestream2_skip(gb, 8);
w = bytestream2_get_le32(gb);
return 0;
}
-static int decode_zlib(AVCodecContext *avctx, AVPacket *avpkt,
+static int decode_zlib(AVCodecContext *avctx, const AVPacket *avpkt,
unsigned size, unsigned uncompressed_size)
{
RASCContext *s = avctx->priv_data;
}
static int decode_move(AVCodecContext *avctx,
- AVPacket *avpkt, unsigned size)
+ const AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
len--;
static int decode_dlta(AVCodecContext *avctx,
- AVPacket *avpkt, unsigned size)
+ const AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
}
static int decode_kfrm(AVCodecContext *avctx,
- AVPacket *avpkt, unsigned size)
+ const AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
}
static int decode_mous(AVCodecContext *avctx,
- AVPacket *avpkt, unsigned size)
+ const AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
}
static int decode_mpos(AVCodecContext *avctx,
- AVPacket *avpkt, unsigned size)
+ const AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
.version = LIBAVUTIL_VERSION_INT,
};
-AVCodec ff_rasc_decoder = {
+const AVCodec ff_rasc_decoder = {
.name = "rasc",
.long_name = NULL_IF_CONFIG_SMALL("RemotelyAnywhere Screen Capture"),
.type = AVMEDIA_TYPE_VIDEO,