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 796207 - omx: always signal drain cond when stopping streaming loop
omx: always signal drain cond when stopping streaming loop
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
unspecified
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-05-17 14:12 UTC by Guillaume Desmottes
Modified: 2018-06-08 07:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
omxvideoenc: factor out gst_omx_video_enc_pause_loop() (2.26 KB, patch)
2018-05-17 14:12 UTC, Guillaume Desmottes
committed Details | Review
omxvideodec: always signal drain cond when stopping streaming loop (5.06 KB, patch)
2018-05-17 14:12 UTC, Guillaume Desmottes
committed Details | Review
omxvideoenc: always signal drain cond when stopping streaming loop (5.03 KB, patch)
2018-05-17 14:12 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2018-05-17 14:12:09 UTC
Fix hang in some cases, see second commit for details.
Comment 1 Guillaume Desmottes 2018-05-17 14:12:42 UTC
Created attachment 372152 [details] [review]
omxvideoenc: factor out gst_omx_video_enc_pause_loop()

No semantic change. I'm going to use it in more failure cases.
Comment 2 Guillaume Desmottes 2018-05-17 14:12:48 UTC
Created attachment 372153 [details] [review]
omxvideodec: always signal drain cond when stopping streaming loop

If for some reason something goes wrong and we stop the streaming loop
we may end up with other threads still waiting on the drain cond.
No more buffers will be produced by the component so they were waiting
forever.

Fix this by always signalling this cond when stopping the streaming
loop.
Comment 3 Guillaume Desmottes 2018-05-17 14:12:57 UTC
Created attachment 372154 [details] [review]
omxvideoenc: always signal drain cond when stopping streaming loop

Similar change as the one I just did in omxvideodec.
Comment 4 Nicolas Dufresne (ndufresne) 2018-06-07 19:03:38 UTC
Does that relates to these two similar looking bugs ?

https://bugzilla.gnome.org/show_bug.cgi?id=743386
https://bugzilla.gnome.org/show_bug.cgi?id=776167
Comment 5 Nicolas Dufresne (ndufresne) 2018-06-07 19:04:50 UTC
Review of attachment 372152 [details] [review]:

Good.
Comment 6 Nicolas Dufresne (ndufresne) 2018-06-07 19:06:05 UTC
Review of attachment 372153 [details] [review]:

Good.
Comment 7 Nicolas Dufresne (ndufresne) 2018-06-07 19:07:12 UTC
Review of attachment 372154 [details] [review]:

I'm fine with this, but it's not symetrical, as you didnd't refactored in a seperate patch this time.
Comment 8 Guillaume Desmottes 2018-06-08 07:48:44 UTC
Attachment 372152 [details] pushed as 798bbc9 - omxvideoenc: factor out gst_omx_video_enc_pause_loop()
Attachment 372153 [details] pushed as fd108f4 - omxvideodec: always signal drain cond when stopping streaming loop
Attachment 372154 [details] pushed as 84483f3 - omxvideoenc: always signal drain cond when stopping streaming loop
Comment 9 Guillaume Desmottes 2018-06-08 07:52:02 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #4)
> Does that relates to these two similar looking bugs ?
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=743386
> https://bugzilla.gnome.org/show_bug.cgi?id=776167

Could be. I commented on those.

(In reply to Nicolas Dufresne (ndufresne) from comment #7)
> Review of attachment 372154 [details] [review] [review]:
> 
> I'm fine with this, but it's not symetrical, as you didnd't refactored in a
> seperate patch this time.

Indeed. The split was mostly to ease the reviewing.

Thanks for the review.