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 766673 - opusdec stops decoding after some time if seek was caused
opusdec stops decoding after some time if seek was caused
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.8.0
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 767689
 
 
Reported: 2016-05-19 15:53 UTC by Marcin Lewandowski
Modified: 2018-01-20 15:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GST_DEBUG=*:5 log (273.39 KB, application/x-xz)
2016-05-19 15:53 UTC, Marcin Lewandowski
Details

Description Marcin Lewandowski 2016-05-19 15:53:19 UTC
Created attachment 328212 [details]
GST_DEBUG=*:5 log

Hello,

I fetch data from HTTP and then decode it (via decodebin) and play it back to the JACK.

I have noticed that if I do seek sometimes Ogg/Opus stream stops playing back after +/- 30s after seek.

It works fine with MP3 and Ogg/Vorbis so I assume it's an opusdec issue.
Comment 1 Wonchul Lee 2016-05-20 03:25:58 UTC
Seek was failed after receiving EOS event because oggdemux disabled delayed seek after got EOS event on purpose.

https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/ogg/gstoggdemux.c#n2422

It tells that have an issue when there is a queue2 in the pipeline.
So I assume it's one of the remaining enhancement work of oggdemux.
Comment 2 Marcin Lewandowski 2016-05-20 20:33:14 UTC
Good hint but I am not using queue2 anywhere in my app. I am using plain queue. AFAIK decodebin uses multiqueue. Do you think that can apply also to multiqueue?
Comment 3 Wonchul Lee 2016-05-23 05:14:30 UTC
No, It disabled all the time whether the queue is added to the pipeline or not.
I'll dig more or maybe Vincent who wrote this could give some advice.
Comment 4 Vincent Penquerc'h 2016-05-26 08:09:57 UTC
The bug with queue2 is that if it gets EOS, it will push and pause its task. Since oggdemux wants to seek again, and continue, it can't tell the upstream queue2 to restart, and the pipeline hangs. oggdemux also can't tell if there is a queue2 upstream.

If an EOS is received while scanning for the end timestamp, the threshold at which to stop may be increased (EOS_AVOIDANCE_THRESHOLD), but this means more imprecision in length determination. This is a handwavy value though, so it'd be nice to find a solution that doesn't rely on stopping before EOS.
Comment 5 Tim-Philipp Müller 2016-05-26 08:30:29 UTC
Upstream queue should restart on a flushing seek, or (if you don't do a flushing seek on purpose) you could do a segment seek so that it doesn't push an eos event when done (perhaps we need an extra flag so upstream doesn't post a segment_done message on the bus as well, which might be confusing to the app).
Comment 6 Vincent Penquerc'h 2016-05-26 09:17:30 UTC
It was always a flushing seek IIRC. Maybe needs to be tried again, there might have been another problem getting in the way, but I distinctly remember queue2's task staying paused.
Comment 7 Sebastian Dröge (slomo) 2016-06-17 08:33:37 UTC
Any news on this? That would be a clear bug in queue2 if it did that, and would also cause problems in general.
Comment 8 Vincent Penquerc'h 2016-06-20 09:58:35 UTC
(In reply to Sebastian Dröge (slomo) from comment #7)
> Any news on this? That would be a clear bug in queue2 if it did that, and
> would also cause problems in general.

Seems to work nowadays: https://bugzilla.gnome.org/show_bug.cgi?id=767689
Comment 9 Vincent Penquerc'h 2016-06-20 09:59:11 UTC
(In reply to Marcin Lewandowski from comment #2)
> Good hint but I am not using queue2 anywhere in my app. I am using plain
> queue. AFAIK decodebin uses multiqueue. Do you think that can apply also to
> multiqueue?

Can you post the pipeline you're using ?
Comment 10 Vincent Penquerc'h 2016-07-20 10:51:27 UTC
FWIW, I can't reproduce this with gst-play-1.0 using pulsesink. Can you reproduce it with pulsesink instead of jack ?
I also had to fix https://bugzilla.gnome.org/show_bug.cgi?id=768991 for seeking to work with gst-play-1.0, in case that makes any difference.
Comment 11 Marcin Lewandowski 2016-07-20 20:57:51 UTC
Thanks for all the  bugs you have hunted. 

I am no longer using JACK in my project and it has advanced so much  that I am not sure whether I will be able to recreate a test case. 

I'll try but it may take some time as whole team has to work on something else for a while.
Comment 12 Vincent Penquerc'h 2016-08-03 15:23:00 UTC
Could that actually be just a symptom of the cause for https://bugzilla.gnome.org/show_bug.cgi?id=766659 ? If some other element hangs, and some element between the hanging element and downstream has some buffer, the pipeline might continue playing for a bit.
Comment 13 Tim-Philipp Müller 2018-01-20 15:01:22 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!