mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
hlssink: remove unnecessary title on EXTINF tag
According to the HLS spec the remainder of the line following the comma on EXTINF tag is not required. This patch removes the fake title and saves some bytes on the playlist. https://bugzilla.gnome.org/show_bug.cgi?id=741096
This commit is contained in:
parent
26d99a6f3e
commit
c306e0dfa7
2 changed files with 4 additions and 7 deletions
|
@ -253,7 +253,7 @@ gst_hls_sink_handle_message (GstBin * bin, GstMessage * message)
|
|||
case GST_MESSAGE_ELEMENT:
|
||||
{
|
||||
GFile *file;
|
||||
const char *filename, *title;
|
||||
const char *filename;
|
||||
char *playlist_content;
|
||||
GstClockTime running_time, duration;
|
||||
gboolean discont = FALSE;
|
||||
|
@ -271,7 +271,6 @@ gst_hls_sink_handle_message (GstBin * bin, GstMessage * message)
|
|||
sink->last_running_time = running_time;
|
||||
|
||||
file = g_file_new_for_path (filename);
|
||||
title = "ciao";
|
||||
GST_INFO_OBJECT (sink, "COUNT %d", sink->index);
|
||||
if (sink->playlist_root == NULL)
|
||||
entry_location = g_path_get_basename (filename);
|
||||
|
@ -282,7 +281,7 @@ gst_hls_sink_handle_message (GstBin * bin, GstMessage * message)
|
|||
}
|
||||
|
||||
gst_m3u8_playlist_add_entry (sink->playlist, entry_location, file,
|
||||
title, duration, sink->index, discont);
|
||||
NULL, duration, sink->index, discont);
|
||||
g_free (entry_location);
|
||||
playlist_content = gst_m3u8_playlist_render (sink->playlist);
|
||||
if (!g_file_set_contents (sink->playlist_location,
|
||||
|
|
|
@ -49,7 +49,6 @@ gst_m3u8_entry_new (const gchar * url, GFile * file, const gchar * title,
|
|||
GstM3U8Entry *entry;
|
||||
|
||||
g_return_val_if_fail (url != NULL, NULL);
|
||||
g_return_val_if_fail (title != NULL, NULL);
|
||||
|
||||
entry = g_new0 (GstM3U8Entry, 1);
|
||||
entry->url = g_strdup (url);
|
||||
|
@ -83,12 +82,12 @@ gst_m3u8_entry_render (GstM3U8Entry * entry, guint version)
|
|||
return g_strdup_printf ("%s" M3U8_INT_INF_TAG,
|
||||
entry->discontinuous ? M3U8_DISCONTINUITY_TAG : "",
|
||||
(gint) ((entry->duration + 500 * GST_MSECOND) / GST_SECOND),
|
||||
entry->title, entry->url);
|
||||
entry->title ? entry->title : "", entry->url);
|
||||
|
||||
return g_strdup_printf ("%s" M3U8_FLOAT_INF_TAG,
|
||||
entry->discontinuous ? M3U8_DISCONTINUITY_TAG : "",
|
||||
g_ascii_dtostr (buf, sizeof (buf), (entry->duration / GST_SECOND)),
|
||||
entry->title, entry->url);
|
||||
entry->title ? entry->title : "", entry->url);
|
||||
}
|
||||
|
||||
GstM3U8Playlist *
|
||||
|
@ -127,7 +126,6 @@ gst_m3u8_playlist_add_entry (GstM3U8Playlist * playlist,
|
|||
|
||||
g_return_val_if_fail (playlist != NULL, FALSE);
|
||||
g_return_val_if_fail (url != NULL, FALSE);
|
||||
g_return_val_if_fail (title != NULL, FALSE);
|
||||
|
||||
if (playlist->type == GST_M3U8_PLAYLIST_TYPE_VOD)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue