示例#1
0
static int startredcode(struct anim * anim) {
	anim->redcodeCtx = redcode_open(anim->name);
	if (!anim->redcodeCtx) {
		return -1;
	}
	anim->duration = redcode_get_length(anim->redcodeCtx);
	
	return 0;
}
示例#2
0
static int isredcode(const char *filename)
{
	struct redcode_handle *h = redcode_open(filename);
	if (!h) {
		return 0;
	}
	redcode_close(h);
	return 1;
}