After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738696 - hlsdemux: send missing stream start
hlsdemux: send missing stream start
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.4.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-17 16:04 UTC by Matthieu Bouron
Modified: 2014-10-25 12:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
hlsdemux: send missing stream start (3.10 KB, patch)
2014-10-17 16:05 UTC, Matthieu Bouron
needs-work Details | Review
hlsdemux: reset end_of_playlist attribute when we receive a seek (1.17 KB, patch)
2014-10-21 10:51 UTC, Matthieu Bouron
committed Details | Review

Description Matthieu Bouron 2014-10-17 16:04:39 UTC
If the demuxer is restarted (by a seek for example) after reaching end of playlist, it should send stream-start even if it re-uses the old pad as well as marking the first buffer as discont.
Comment 1 Matthieu Bouron 2014-10-17 16:05:11 UTC
Created attachment 288766 [details] [review]
hlsdemux: send missing stream start
Comment 2 Sebastian Dröge (slomo) 2014-10-20 10:45:30 UTC
Review of attachment 288766 [details] [review]:

::: ext/hls/gsthlsdemux.c
@@ +269,3 @@
   demux->group_id = G_MAXUINT;
+
+  demux->need_stream_start = FALSE;

Shouldn't it be TRUE by default? Also reset to TRUE in the reset() function?

@@ +981,3 @@
+
+    gst_pad_push_event (demux->srcpad, event);
+    g_free (stream_id);

This code looks duplicated, refactor it into a helper function

@@ +2218,3 @@
+      demux->end_of_playlist = FALSE;
+      demux->discont = TRUE;
+      demux->need_stream_start = TRUE;

This seems weird. It should probably stay at end_of_playlist until a FLUSH or reset happens... and after EOS no new stream-start event is needed usually.
Comment 3 Matthieu Bouron 2014-10-21 10:51:02 UTC
Created attachment 289015 [details] [review]
hlsdemux: reset end_of_playlist attribute when we receive a seek
Comment 4 Matthieu Bouron 2014-10-21 10:54:54 UTC
(In reply to comment #2)
> Review of attachment 288766 [details] [review]:
> This seems weird. It should probably stay at end_of_playlist until a FLUSH or
> reset happens... and after EOS no new stream-start event is needed usually.

The whole patch is not needed then. I've attached a new patch that reset the end_of_playlist attribute when we receive a seek so it reflects 

Note that the end_of_playlist attribute is not used anywhere, and can possibly be removed.
Comment 5 Sebastian Dröge (slomo) 2014-10-21 10:56:21 UTC
commit 7fb584b08788323bad2cbd7e651531dd2ce191b4
Author: Matthieu Bouron <matthieu.bouron@collabora.com>
Date:   Tue Oct 21 12:39:14 2014 +0200

    hlsdemux: reset end_of_playlist attribute when we receive a seek
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738696