diff options
author | Jacek Antonelli | 2009-02-12 02:06:41 -0600 |
---|---|---|
committer | Jacek Antonelli | 2009-02-12 02:06:45 -0600 |
commit | 61f97b33f9850d21965d397b947a298c16ba576d (patch) | |
tree | a2edff0a7fbc83e2259eda952511b0fbdbea290b /linden/indra/llmedia/llmediaimplgstreamer.cpp | |
parent | Second Life viewer sources 1.22.7-RC (diff) | |
download | meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.zip meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.gz meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.bz2 meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.xz |
Second Life viewer sources 1.22.8-RC
Diffstat (limited to 'linden/indra/llmedia/llmediaimplgstreamer.cpp')
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index 573c699..51614c5 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp | |||
@@ -80,6 +80,8 @@ LLMediaImplGStreamer () : | |||
80 | { | 80 | { |
81 | DEBUGMSG("constructing media..."); | 81 | DEBUGMSG("constructing media..."); |
82 | 82 | ||
83 | mVolume = 0.1234567; // minor hack to force an initial volume update | ||
84 | |||
83 | setMediaDepth(4); | 85 | setMediaDepth(4); |
84 | 86 | ||
85 | // Create a pumpable main-loop for this media | 87 | // Create a pumpable main-loop for this media |
@@ -639,12 +641,19 @@ bool | |||
639 | LLMediaImplGStreamer:: | 641 | LLMediaImplGStreamer:: |
640 | setVolume(float volume) | 642 | setVolume(float volume) |
641 | { | 643 | { |
644 | // we try to only update volume as conservatively as | ||
645 | // possible, as many gst-plugins-base versions up to at least | ||
646 | // November 2008 have critical race-conditions in setting volume - sigh | ||
647 | if (mVolume == volume) | ||
648 | return true; // nothing to do, everything's fine | ||
649 | |||
642 | mVolume = volume; | 650 | mVolume = volume; |
643 | if (mPlaybin) | 651 | if (mPlaybin) |
644 | { | 652 | { |
645 | g_object_set(mPlaybin, "volume", mVolume, NULL); | 653 | g_object_set(mPlaybin, "volume", mVolume, NULL); |
646 | return true; | 654 | return true; |
647 | } | 655 | } |
656 | |||
648 | return false; | 657 | return false; |
649 | } | 658 | } |
650 | 659 | ||