aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmedia/llmediaimplgstreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmedia/llmediaimplgstreamer.cpp')
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index 5978ba3..98f53ca 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -591,9 +591,6 @@ bool LLMediaImplGStreamer::navigateTo (const std::string urlIn)
591 591
592 mState = GST_STATE_READY; 592 mState = GST_STATE_READY;
593 593
594 // navigateTo implicitly plays, too.
595 play();
596
597 return true; 594 return true;
598} 595}
599 596
@@ -792,6 +789,13 @@ bool LLMediaImplGStreamer::play()
792 if (!mPlaybin || mState == GST_STATE_NULL) 789 if (!mPlaybin || mState == GST_STATE_NULL)
793 return true; 790 return true;
794 791
792
793 if( getState() == GST_STATE_PLAYING )
794 {
795 LL_DEBUGS("MediaImpl") << "... but already playing." << LL_ENDL;
796 return true;
797 }
798
795 // Clean up the existing thread, if any. 799 // Clean up the existing thread, if any.
796 if( mPlayThread != NULL && mPlayThread->isStopped()) 800 if( mPlayThread != NULL && mPlayThread->isStopped())
797 { 801 {
@@ -813,9 +817,6 @@ bool LLMediaImplGStreamer::play()
813 817
814void LLMediaImplGStreamer::startPlay() 818void LLMediaImplGStreamer::startPlay()
815{ 819{
816 GstElement *pipeline = (GstElement *)gst_object_ref(GST_OBJECT(mPlaybin));
817 gst_object_unref(pipeline);
818
819 GstStateChangeReturn state_change; 820 GstStateChangeReturn state_change;
820 821
821 state_change = gst_element_set_state(mPlaybin, GST_STATE_PLAYING); 822 state_change = gst_element_set_state(mPlaybin, GST_STATE_PLAYING);