summaryrefslogtreecommitdiff
path: root/gst/elements/gstfilesink.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-06-06 23:48:04 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-06-06 23:48:04 +0000
commitfdba81e0fa85dec05ea7f14f25666134ae3c5812 (patch)
treedc7f629970742146e5f9c1df923c56a63726b110 /gst/elements/gstfilesink.c
parent04471c9cddd54e02c88484ffc1301aacfab0b302 (diff)
Some adjustments to allow for setting a new filename after EOS, useful for writing multiple files
Original commit message from CVS: Some adjustments to allow for setting a new filename after EOS, useful for writing multiple files
Diffstat (limited to 'gst/elements/gstfilesink.c')
-rw-r--r--gst/elements/gstfilesink.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gst/elements/gstfilesink.c b/gst/elements/gstfilesink.c
index 5c4002191..ce1832d1c 100644
--- a/gst/elements/gstfilesink.c
+++ b/gst/elements/gstfilesink.c
@@ -168,15 +168,15 @@ gst_filesink_set_property (GObject *object, guint prop_id, const GValue *value,
switch (prop_id) {
case ARG_LOCATION:
/* the element must be stopped or paused in order to do this */
- g_return_if_fail (GST_STATE (sink) < GST_STATE_PLAYING);
+ g_return_if_fail (GST_STATE (sink) <= GST_STATE_PAUSED);
+ if (GST_STATE (sink) == GST_STATE_PAUSED)
+ g_return_if_fail (!GST_FLAG_IS_SET (sink, GST_FILESINK_OPEN));
+
if (sink->filename)
g_free (sink->filename);
sink->filename = g_strdup (g_value_get_string (value));
- if ((GST_STATE (sink) == GST_STATE_PAUSED) &&
- (sink->filename != NULL)) {
- gst_filesink_close_file (sink);
+ if (GST_STATE (sink) == GST_STATE_PAUSED)
gst_filesink_open_file (sink);
- }
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);