summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-04-04 11:55:00 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-04-04 11:55:00 -0300
commitcf7d9f676d5af0958d048ab0113d2b8ca1675582 (patch)
treebea8aecb085cd0974dd400756118bb082d4df430 /gst
parent00e5d90ffc767a132a25c53736741cb5893c9006 (diff)
multifilesink: close files before posting message
Makes sure the files were properly flushed and closed before the message reaches the application
Diffstat (limited to 'gst')
-rw-r--r--gst/multifile/gstmultifilesink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gst/multifile/gstmultifilesink.c b/gst/multifile/gstmultifilesink.c
index c9fc2f55c..deaaea609 100644
--- a/gst/multifile/gstmultifilesink.c
+++ b/gst/multifile/gstmultifilesink.c
@@ -834,13 +834,12 @@ gst_multi_file_sink_event (GstBaseSink * sink, GstEvent * event)
offset = offset_end = -1;
filename = g_strdup_printf (multifilesink->filename,
multifilesink->index);
- gst_multi_file_sink_post_message_full (multifilesink, timestamp,
- duration, offset, offset_end, running_time, stream_time, filename);
-
- g_free (filename);
gst_multi_file_sink_close_file (multifilesink, NULL);
+ gst_multi_file_sink_post_message_full (multifilesink, timestamp,
+ duration, offset, offset_end, running_time, stream_time, filename);
+ g_free (filename);
}
if (multifilesink->file == NULL) {
@@ -856,11 +855,12 @@ gst_multi_file_sink_event (GstBaseSink * sink, GstEvent * event)
filename = g_strdup_printf (multifilesink->filename,
multifilesink->index);
+
+ gst_multi_file_sink_close_file (multifilesink, NULL);
+
gst_multi_file_sink_post_message_from_time (multifilesink,
GST_BASE_SINK (multifilesink)->segment.position, -1, filename);
g_free (filename);
-
- gst_multi_file_sink_close_file (multifilesink, NULL);
}
break;
default: