ignore pause,unpause when not in 'running'-state
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 6 Apr 2009 12:29:38 +0000 (14:29 +0200)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 6 Apr 2009 12:29:38 +0000 (14:29 +0200)
lib/service/servicemp3.cpp

index 006c6e941933881d653afbb75828028f63078fef..80356dc5903753bf1dd0b711c3e60779a79c8354 100644 (file)
@@ -696,6 +696,9 @@ void eServiceMP3::seekTimeoutCB()
                // iPausableService
 RESULT eServiceMP3::pause()
 {
+       if (m_state != stRunning)
+               return;
+       
        if (!m_gst_pipeline)
                return -1;
        GstStateChangeReturn res = gst_element_set_state(m_gst_pipeline, GST_STATE_PAUSED);
@@ -710,6 +713,9 @@ RESULT eServiceMP3::pause()
 
 RESULT eServiceMP3::unpause()
 {
+       if (m_state != stRunning)
+               return;
+
        if (!m_gst_pipeline)
                return -1;