mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +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>
|
||||
|
||||
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->file = NULL;
|
||||
|
||||
GST_BASE_SINK (filesink)->sync = FALSE;
|
||||
gst_base_sink_set_sync (GST_BASE_SINK (filesink), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -175,11 +175,8 @@ gst_file_sink_dispose (GObject * object)
|
|||
static gboolean
|
||||
gst_file_sink_set_location (GstFileSink * sink, const gchar * location)
|
||||
{
|
||||
if (sink->file) {
|
||||
g_warning ("Changing the `location' property on filesink when "
|
||||
"a file is open not supported.");
|
||||
return FALSE;
|
||||
}
|
||||
if (sink->file)
|
||||
goto was_open;
|
||||
|
||||
g_free (sink->filename);
|
||||
g_free (sink->uri);
|
||||
|
@ -192,6 +189,14 @@ gst_file_sink_set_location (GstFileSink * sink, const gchar * location)
|
|||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
/* ERRORS */
|
||||
was_open:
|
||||
{
|
||||
g_warning ("Changing the `location' property on filesink when "
|
||||
"a file is open not supported.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
static void
|
||||
gst_file_sink_set_property (GObject * object, guint prop_id,
|
||||
|
@ -269,6 +274,7 @@ gst_file_sink_close_file (GstFileSink * sink)
|
|||
goto close_failed;
|
||||
|
||||
GST_DEBUG_OBJECT (sink, "closed file");
|
||||
sink->file = NULL;
|
||||
}
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue