mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
multifilesink: close files before posting message
Makes sure the files were properly flushed and closed before the message reaches the application
This commit is contained in:
parent
00e5d90ffc
commit
cf7d9f676d
1 changed files with 6 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue