mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
plugins/elements/gstfilesink.c: Set file to NULL when closing filesink so that we can set a new filename in READY. Fi...
Original commit message from CVS: * plugins/elements/gstfilesink.c: (gst_file_sink_init), (gst_file_sink_set_location), (gst_file_sink_open_file), (gst_file_sink_close_file), (gst_file_sink_event), (gst_file_sink_render): Set file to NULL when closing filesink so that we can set a new filename in READY. Fixes #358613.
This commit is contained in:
parent
86a6abe32d
commit
20f1785042
2 changed files with 21 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2006-10-02 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* plugins/elements/gstfilesink.c: (gst_file_sink_init),
|
||||||
|
(gst_file_sink_set_location), (gst_file_sink_open_file),
|
||||||
|
(gst_file_sink_close_file), (gst_file_sink_event),
|
||||||
|
(gst_file_sink_render):
|
||||||
|
Set file to NULL when closing filesink so that we can set a new filename
|
||||||
|
in READY. Fixes #358613.
|
||||||
|
|
||||||
2006-10-02 Tim-Philipp Müller <tim at centricular dot net>
|
2006-10-02 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
Patch by: Alessandro Decina <alessandro at nnva org>
|
Patch by: Alessandro Decina <alessandro at nnva org>
|
||||||
|
|
|
@ -156,7 +156,7 @@ gst_file_sink_init (GstFileSink * filesink, GstFileSinkClass * g_class)
|
||||||
filesink->filename = NULL;
|
filesink->filename = NULL;
|
||||||
filesink->file = NULL;
|
filesink->file = NULL;
|
||||||
|
|
||||||
GST_BASE_SINK (filesink)->sync = FALSE;
|
gst_base_sink_set_sync (GST_BASE_SINK (filesink), FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -175,11 +175,8 @@ gst_file_sink_dispose (GObject * object)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_file_sink_set_location (GstFileSink * sink, const gchar * location)
|
gst_file_sink_set_location (GstFileSink * sink, const gchar * location)
|
||||||
{
|
{
|
||||||
if (sink->file) {
|
if (sink->file)
|
||||||
g_warning ("Changing the `location' property on filesink when "
|
goto was_open;
|
||||||
"a file is open not supported.");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (sink->filename);
|
g_free (sink->filename);
|
||||||
g_free (sink->uri);
|
g_free (sink->uri);
|
||||||
|
@ -192,6 +189,14 @@ gst_file_sink_set_location (GstFileSink * sink, const gchar * location)
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* ERRORS */
|
||||||
|
was_open:
|
||||||
|
{
|
||||||
|
g_warning ("Changing the `location' property on filesink when "
|
||||||
|
"a file is open not supported.");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
gst_file_sink_set_property (GObject * object, guint prop_id,
|
gst_file_sink_set_property (GObject * object, guint prop_id,
|
||||||
|
@ -269,6 +274,7 @@ gst_file_sink_close_file (GstFileSink * sink)
|
||||||
goto close_failed;
|
goto close_failed;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (sink, "closed file");
|
GST_DEBUG_OBJECT (sink, "closed file");
|
||||||
|
sink->file = NULL;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue