summaryrefslogtreecommitdiff
path: root/vhook/imlib2.c
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2002-11-30 17:17:58 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2002-11-30 17:17:58 +0000
commit6c11d48cabf127d254620a110e1deaa952b7f8f7 (patch)
treea747ddcea7d13a5d7e37456725bf73e2701e9c0f /vhook/imlib2.c
parent042f24652e09afe9bc7d865fa0af29855ea9dae9 (diff)
Added a release function to free up the context. Also removed the dummy
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/trunk
Diffstat (limited to 'vhook/imlib2.c')
-rw-r--r--vhook/imlib2.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/vhook/imlib2.c b/vhook/imlib2.c
index fcc09e17f3..576b45d004 100644
--- a/vhook/imlib2.c
+++ b/vhook/imlib2.c
@@ -72,6 +72,19 @@ typedef struct _CachedImage {
int height;
} 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[])
{
@@ -261,6 +274,3 @@ done:
;
}
-/* To ensure correct typing */
-FrameHookConfigureFn ConfigureFn = Configure;
-FrameHookProcessFn ProcessFn = Process;