ff-save: move a static flag to private data

This makes gegl:ff-save possible to use in applications saving many different
container types.
parent 2216bff6
...@@ -130,6 +130,8 @@ typedef struct ...@@ -130,6 +130,8 @@ typedef struct
long audio_read_pos; long audio_read_pos;
int next_apts; int next_apts;
int file_inited;
} Priv; } Priv;
static void static void
...@@ -970,7 +972,6 @@ process (GeglOperation *operation, ...@@ -970,7 +972,6 @@ process (GeglOperation *operation,
{ {
GeglProperties *o = GEGL_PROPERTIES (operation); GeglProperties *o = GEGL_PROPERTIES (operation);
Priv *p = (Priv*)o->user_data; Priv *p = (Priv*)o->user_data;
static gint inited = 0;
g_assert (input); g_assert (input);
...@@ -982,10 +983,10 @@ process (GeglOperation *operation, ...@@ -982,10 +983,10 @@ process (GeglOperation *operation,
p->height = result->height; p->height = result->height;
p->input = input; p->input = input;
if (!inited) if (!p->file_inited)
{ {
tfile (o); tfile (o);
inited = 1; p->file_inited = 1;
} }
write_video_frame (o, p->oc, p->video_st); write_video_frame (o, p->oc, p->video_st);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment