mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
hlssink: catch failure to write playlist file
Coverity 1139613
This commit is contained in:
parent
e308986807
commit
b3a18a2fcc
1 changed files with 8 additions and 2 deletions
|
@ -283,8 +283,14 @@ gst_hls_sink_handle_message (GstBin * bin, GstMessage * message)
|
||||||
title, duration, sink->index, discont);
|
title, duration, sink->index, discont);
|
||||||
g_free (entry_location);
|
g_free (entry_location);
|
||||||
playlist_content = gst_m3u8_playlist_render (sink->playlist);
|
playlist_content = gst_m3u8_playlist_render (sink->playlist);
|
||||||
g_file_set_contents (sink->playlist_location,
|
if (!g_file_set_contents (sink->playlist_location,
|
||||||
playlist_content, -1, &error);
|
playlist_content, -1, &error)) {
|
||||||
|
GST_ERROR ("Failed to write playlist: %s", error->message);
|
||||||
|
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
|
||||||
|
(("Failed to write playlist '%s'."), error->message), (NULL));
|
||||||
|
g_error_free (error);
|
||||||
|
error = NULL;
|
||||||
|
}
|
||||||
g_free (playlist_content);
|
g_free (playlist_content);
|
||||||
|
|
||||||
/* multifilesink is starting a new file. It means that upstream sent a key
|
/* multifilesink is starting a new file. It means that upstream sent a key
|
||||||
|
|
Loading…
Reference in a new issue