while (src < src_end && dst < dst_end) {
code = *src++;
if (code & 0x80) {
+ if (src >= src_end)
+ break;
len = code - 0x7F;
memset(dst, *src++, FFMIN(len, dst_end - dst));
} else {
len = code + 1;
- memcpy(dst, src, FFMIN(len, dst_end - dst));
+ memcpy(dst, src, FFMIN3(len, dst_end - dst, src_end - src));
src += len;
}
dst += len;
}
}
+ bitmap_frame_size = FFMIN(cin->bitmap_size, bitmap_frame_size);
+
/* note: the decoding routines below assumes that
* surface.width = surface.pitch */
switch (bitmap_frame_type) {
AVCodec ff_dsicinvideo_decoder = {
.name = "dsicinvideo",
+ .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN video"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_DSICINVIDEO,
.priv_data_size = sizeof(CinVideoContext),
.close = cinvideo_decode_end,
.decode = cinvideo_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN video"),
};
AVCodec ff_dsicinaudio_decoder = {
.name = "dsicinaudio",
+ .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN audio"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_DSICINAUDIO,
.priv_data_size = sizeof(CinAudioContext),
.init = cinaudio_decode_init,
.decode = cinaudio_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN audio"),
};