Bug 307469 - Delete streamreader at more appropriate time
Summary: Delete streamreader at more appropriate time
Status: RESOLVED FIXED
Alias: None
Product: phonon-backend-gstreamer
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: 4.7
Assignee: Harald Sitter
URL: http://youporn.com
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-26 23:57 UTC by Harald Sitter
Modified: 2012-12-09 23:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2012-09-26 23:57:37 UTC
When feeding the phonon gstreamer sources faster than it can play them, the streamreader will be deleted before gstreamer is done using it. This in turn triggers various asserts in the stream interface as well as deadlocks the eventloop.
Greetings to Trever.

Reproducible: Always
Comment 1 Harald Sitter 2012-12-09 23:13:40 UTC
Git commit 973f82c4611da4aa182d75cc5c8f860746aba90b by Harald Sitter.
Committed on 10/12/2012 at 00:13.
Pushed by sitter into branch 'master'.

fix assertation fails due to gstreamer reading from deleted readers

instead of deleting a read in setsource it is now deleted on setupsource
which is a callback from gstreamer when the new source is being actually
set up. in particular we may still be playing on stream1 when setsource is
called with stream2 (e.g. set while abouttofinish was in progress), so
previously stream1 would have been deleted while gstreamer was still
reading, now it is not.

also start a newly created reader right away as gstreamer may do probing
calls while we are still working in setupsource, so our reader needs to be
ready to handle those. starting asap is fine here as the setup is only done
once we start loading the source anyway (targeting playing/paused, so
technically statewise we are somewhere between stopped and playing).

M  +15   -10   gstreamer/pipeline.cpp

http://commits.kde.org/phonon-gstreamer/973f82c4611da4aa182d75cc5c8f860746aba90b