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 734616 - vaapidecode: Not reusable after EOS and reporting errors when flushing before playbacks tarted
vaapidecode: Not reusable after EOS and reporting errors when flushing before...
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 731852
 
 
Reported: 2014-08-11 14:14 UTC by Sebastian Dröge (slomo)
Modified: 2014-08-20 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapidecode: Don't try flushing the decoder instance if we didn't create one yet (1.26 KB, patch)
2014-08-11 14:16 UTC, Sebastian Dröge (slomo)
committed Details | Review
vaapidecode: Reset decoder_finish variable after stopping the decoder thread (881 bytes, patch)
2014-08-11 14:16 UTC, Sebastian Dröge (slomo)
committed Details | Review
Unlock condition variables before shutting down the element (1.21 KB, patch)
2014-08-12 10:03 UTC, Sebastian Dröge (slomo)
committed Details | Review
Start the decoder task again after finishing (1.61 KB, patch)
2014-08-12 10:03 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2014-08-11 14:14:20 UTC
See attached patches, should be pretty self explanatory.
Comment 1 Sebastian Dröge (slomo) 2014-08-11 14:16:24 UTC
Created attachment 283103 [details] [review]
vaapidecode: Don't try flushing the decoder instance if we didn't create one yet

This otherwise results in unnecessary error messages.
Comment 2 Sebastian Dröge (slomo) 2014-08-11 14:16:30 UTC
Created attachment 283104 [details] [review]
vaapidecode: Reset decoder_finish variable after stopping the decoder thread

Otherwise the element is not usable again after draining/EOS.
Comment 3 Sebastian Dröge (slomo) 2014-08-12 10:03:22 UTC
Created attachment 283169 [details] [review]
Unlock condition variables before shutting down the element

Otherwise threads might wait for them, causing the shutdown of the element
to deadlock on the streaming thread.
Comment 4 Sebastian Dröge (slomo) 2014-08-12 10:03:27 UTC
Created attachment 283170 [details] [review]
Start the decoder task again after finishing

This allows the element to accept data again after draining without
a hard reset or caps change happening in between.
Comment 5 Gwenole Beauchesne 2014-08-20 15:31:47 UTC
(In reply to comment #0)
> See attached patches, should be pretty self explanatory.

They all look fine. Thanks. I will push them if this survives regression testing.
Comment 6 Gwenole Beauchesne 2014-08-20 15:37:39 UTC
commit 3b2e06be6cd5d42a9961c0a0c635289c54f48d39
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Aug 12 13:01:57 2014 +0300

    vaapidecode: start the decoder task again after finishing
    
    This allows the element to accept data again after draining without
    a hard reset or caps change happening in between.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734616

commit 2af44842c6d3cde3d3a6788bdcd149802fb75908
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Aug 12 13:00:03 2014 +0300

    vaapidecode: unlock condition variables before shutting down the element
    
    Otherwise threads might wait for them, causing the shutdown of the element
    to deadlock on the streaming thread.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734616

commit c551cc7cc347f279474ddc427930f206f898167a
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Aug 11 17:15:24 2014 +0300

    vaapidecode: reset decoder_finish variable after stopping the decoder thread
    
    Otherwise the element is not usable again after draining/EOS.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734616

commit 4ff4563a471e3a0a089648a539084ee220483e88
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Aug 11 17:14:53 2014 +0300

    vaapidecode: don't try flushing the decoder instance if we didn't create one yet
    
    This otherwise results in unnecessary error messages.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734616