[gegl/video-rejuvenation: 37/60] ff-load: do cleanup on reinit
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/video-rejuvenation: 37/60] ff-load: do cleanup on reinit
- Date: Mon, 16 Nov 2015 22:16:35 +0000 (UTC)
commit 5f6afcd5d4b3553d79061e04ab702e07ca403a77
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Oct 31 02:06:24 2015 +0100
ff-load: do cleanup on reinit
operations/external/ff-load.c | 63 +++++++++++++++++++++-------------------
1 files changed, 33 insertions(+), 30 deletions(-)
---
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index 7cb7af9..e844e6c 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -114,36 +114,6 @@ print_error (const char *filename, int err)
}
}
-static void
-init (GeglProperties *o)
-{
- Priv *p = (Priv*)o->user_data;
- static gint av_inited = 0;
- if (av_inited == 0)
- {
- av_register_all ();
- av_inited = 1;
- }
-
- if (p == NULL)
- {
- p = g_new0 (Priv, 1);
- o->user_data = (void*) p;
- }
-
- p->width = 320;
- p->height = 200;
-
- while (p->audio_track)
- {
- g_free (p->audio_track->data);
- p->audio_track = g_list_remove (p->audio_track, p->audio_track->data);
- }
- p->audio_cursor = NULL;
- p->loadedfilename = g_strdup ("");
- p->fourcc = g_strdup ("");
- p->codec_name = g_strdup ("");
-}
static void
ff_cleanup (GeglProperties *o)
@@ -182,6 +152,39 @@ ff_cleanup (GeglProperties *o)
}
}
+static void
+init (GeglProperties *o)
+{
+ Priv *p = (Priv*)o->user_data;
+ static gint av_inited = 0;
+ if (av_inited == 0)
+ {
+ av_register_all ();
+ av_inited = 1;
+ }
+
+ if (p == NULL)
+ {
+ p = g_new0 (Priv, 1);
+ o->user_data = (void*) p;
+ }
+
+ p->width = 320;
+ p->height = 200;
+
+ while (p->audio_track)
+ {
+ g_free (p->audio_track->data);
+ p->audio_track = g_list_remove (p->audio_track, p->audio_track->data);
+ }
+ p->audio_cursor = NULL;
+ p->loadedfilename = g_strdup ("");
+ p->fourcc = g_strdup ("");
+ p->codec_name = g_strdup ("");
+
+ ff_cleanup (o);
+}
+
static glong
prev_keyframe (Priv *priv, glong frame)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]