declarations at the bottom of the file. This type checking is now handled by the header file. Originally committed as revision 1295 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.5
@@ -82,6 +82,11 @@ static void dorange(const char *s, int *first, int *second, int maxval) | |||||
*second = maxval; | *second = maxval; | ||||
} | } | ||||
void Release(void *ctx) | |||||
{ | |||||
if (ctx) | |||||
av_free(ctx); | |||||
} | |||||
int Configure(void **ctxp, int argc, char *argv[]) | int Configure(void **ctxp, int argc, char *argv[]) | ||||
{ | { | ||||
@@ -325,6 +330,3 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, | |||||
} | } | ||||
} | } | ||||
/* To ensure correct typing */ | |||||
FrameHookConfigureFn ConfigureFn = Configure; | |||||
FrameHookProcessFn ProcessFn = Process; |
@@ -72,6 +72,19 @@ typedef struct _CachedImage { | |||||
int height; | int height; | ||||
} CachedImage; | } CachedImage; | ||||
void Release(void *ctx) | |||||
{ | |||||
ContextInfo *ci; | |||||
ci = (ContextInfo *) ctx; | |||||
if (ci->cache) { | |||||
imlib_context_set_image(ci->cache->image); | |||||
imlib_free_image(); | |||||
av_free(ci->cache); | |||||
} | |||||
if (ctx) | |||||
av_free(ctx); | |||||
} | |||||
int Configure(void **ctxp, int argc, char *argv[]) | int Configure(void **ctxp, int argc, char *argv[]) | ||||
{ | { | ||||
@@ -261,6 +274,3 @@ done: | |||||
; | ; | ||||
} | } | ||||
/* To ensure correct typing */ | |||||
FrameHookConfigureFn ConfigureFn = Configure; | |||||
FrameHookProcessFn ProcessFn = Process; |
@@ -24,6 +24,14 @@ typedef struct { | |||||
int dummy; | int dummy; | ||||
} ContextInfo; | } ContextInfo; | ||||
void Release(void *ctx) | |||||
{ | |||||
ContextInfo *ci; | |||||
ci = (ContextInfo *) ctx; | |||||
if (ctx) | |||||
av_free(ctx); | |||||
} | |||||
int Configure(void **ctxp, int argc, char *argv[]) | int Configure(void **ctxp, int argc, char *argv[]) | ||||
{ | { | ||||
@@ -68,6 +76,3 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, | |||||
av_free(buf); | av_free(buf); | ||||
} | } | ||||
/* To ensure correct typing */ | |||||
FrameHookConfigureFn ConfigureFn = Configure; | |||||
FrameHookProcessFn ProcessFn = Process; |