diff options
author | Flávio Ribeiro <email@flavioribeiro.com> | 2014-12-04 02:12:08 -0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-12-04 17:52:08 +0100 |
commit | c306e0dfa74301322cedd7ec9714592bcb583702 (patch) | |
tree | ce8bb50d7b235964457a93f2f9a0304310fb3913 /ext/hls/gstm3u8playlist.c | |
parent | 26d99a6f3ec359c00ee5c19705e1cc120e04ab2b (diff) | |
download | gstreamer-plugins-bad-c306e0dfa74301322cedd7ec9714592bcb583702.tar.gz |
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
Diffstat (limited to 'ext/hls/gstm3u8playlist.c')
-rw-r--r-- | ext/hls/gstm3u8playlist.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/hls/gstm3u8playlist.c b/ext/hls/gstm3u8playlist.c index f30a66709..075e45fa3 100644 --- a/ext/hls/gstm3u8playlist.c +++ b/ext/hls/gstm3u8playlist.c @@ -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; |