Bug 339511

Summary: Phonon gstreamer freezes when it's playing http stream and network lost
Product: [Frameworks and Libraries] phonon-backend-gstreamer Reporter: Weng Xuetian <wengxt>
Component: generalAssignee: Daniel Vrátil <dvratil>
Status: RESOLVED FIXED    
Severity: normal CC: myriam, romain.perier, sitter, tdfischer
Priority: NOR    
Version: 4.8.0   
Target Milestone: 4.8   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.1

Description Weng Xuetian 2014-09-29 16:00:17 UTC
Currently I can reproduce this bug with cantata ("https://code.google.com/p/cantata/") or a simply code

    Phonon::MediaObject* player=new Phonon::MediaObject(this);
    Phonon::createPath(player, new Phonon::AudioOutput(Phonon::MusicCategory, this));
    player->setCurrentSource(QUrl("http://somehttpstream"));
    player->play();

I just run this code on some stream and manually cut down the network then it's freezed.

The full backtrace from cantata is http://paste.ubuntu.com/8459376/



Reproducible: Always

Steps to Reproduce:
1. play a stream
2. disconnect network

Actual Results:  
player freeze

Expected Results:  
doesn't freeze
Comment 1 Weng Xuetian 2014-09-30 20:21:54 UTC
Git commit 4bb52a061b669c3ce03bb07e49a35a034aa5fc7b by Weng Xuetian.
Committed on 30/09/2014 at 20:17.
Pushed by xuetianweng into branch '4.8'.

Prevent call to gst_element_set_state from a streaming thread

it's possible for gstreamer to use a stream thread to emit all
sync-message signal, but gst_element_set_state can not be called from a
mainloop other than main thread, here we use QObject::invokeMethod to
make the call happen in main thread.
REVIEW: 120425
FIXED-IN: 4.8.1

M  +3    -2    gstreamer/pipeline.cpp
M  +1    -1    gstreamer/pipeline.h

http://commits.kde.org/phonon-gstreamer/4bb52a061b669c3ce03bb07e49a35a034aa5fc7b