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 766650 - adaptivedemux: Set DISCONT on startup and after seeks
adaptivedemux: Set DISCONT on startup and after seeks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-19 09:18 UTC by Edward Hervey
Modified: 2016-07-25 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
adaptivedemux: Set DISCONT on startup and after seeks (1.66 KB, patch)
2016-05-19 09:18 UTC, Edward Hervey
none Details | Review
adaptivedemux: Set DISCONT on startup and after seeks (1.33 KB, patch)
2016-06-01 10:00 UTC, Sebastian Dröge (slomo)
needs-work Details | Review
adaptivedemux: Set DISCONT on startup, resume and after seeks (1.60 KB, patch)
2016-06-01 10:03 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Edward Hervey 2016-05-19 09:18:12 UTC
See commit
Comment 1 Edward Hervey 2016-05-19 09:18:16 UTC
Created attachment 328176 [details] [review]
adaptivedemux: Set DISCONT on startup and after seeks

Initial buffers after STREAM_START and seeks should always have the
DISCONT flag set.
Comment 2 Thiago Sousa Santos 2016-05-19 10:39:14 UTC
Review of attachment 328176 [details] [review]:

Looks good, just some minor comments.

::: gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ +1041,3 @@
     stream->pending_segment = gst_event_new_segment (&stream->segment);
     gst_event_set_seqnum (stream->pending_segment, demux->priv->segment_seqnum);
+    stream->discont = TRUE;

This seems to be redundant, it should already be true after the change above.

@@ +1467,3 @@
           gst_event_unref (seg_evt);
+          /* Make sure the first buffer after a seek has the discont flag */
+          stream->discont = TRUE;

Is it worth verifying if start/stop was set to avoid sending a discont if position didn't change?
Comment 3 Edward Hervey 2016-05-19 12:18:54 UTC
Review of attachment 328176 [details] [review]:

::: gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ +1044,1 @@
   }

Which change are you talking about ?

@@ +1467,3 @@
           gst_event_unref (seg_evt);
+          /* Make sure the first buffer after a seek has the discont flag */
+          stream->discont = TRUE;

Good idea
Comment 4 Sebastian Dröge (slomo) 2016-05-25 12:33:26 UTC
(In reply to Edward Hervey from comment #3)
> Review of attachment 328176 [details] [review] [review]:
> 
> ::: gst-libs/gst/adaptivedemux/gstadaptivedemux.c
> @@ +1044,1 @@
>    }
> 
> Which change are you talking about ?

The hunk above, line 881 :)
Comment 5 Sebastian Dröge (slomo) 2016-06-01 10:00:04 UTC
Created attachment 328868 [details] [review]
adaptivedemux: Set DISCONT on startup and after seeks

Initial buffers after STREAM_START and seeks should always have the
DISCONT flag set.
Comment 6 Sebastian Dröge (slomo) 2016-06-01 10:03:36 UTC
Created attachment 328869 [details] [review]
adaptivedemux: Set DISCONT on startup, resume and after seeks

Initial buffers after STREAM_START and seeks should always have the
DISCONT flag set.
Comment 7 Sebastian Dröge (slomo) 2016-06-01 10:04:54 UTC
Comment on attachment 328868 [details] [review]
adaptivedemux: Set DISCONT on startup and after seeks

Also setting discont when resuming a stream now.
Comment 8 Sebastian Dröge (slomo) 2016-06-06 10:07:51 UTC
Attachment 328869 [details] pushed as 9296b26 - adaptivedemux: Set DISCONT on startup, resume and after seeks
Comment 9 Jan Schmidt 2016-07-25 15:51:23 UTC
This commit made the hls_demux test a bit racy. The commit seems OK though, so it's probably the test:

elements/adaptive_demux_common.c:260:F:basicTest:testSeekUpdateStopPosition:0: size validation failed, expected 33840 received 22560