title, duration, sink->index, discont);
g_free (entry_location);
playlist_content = gst_m3u8_playlist_render (sink->playlist);
- g_file_set_contents (sink->playlist_location,
- playlist_content, -1, &error);
+ if (!g_file_set_contents (sink->playlist_location,
+ 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);
/* multifilesink is starting a new file. It means that upstream sent a key