Page MenuHomePhabricator (Chris)

No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None
diff --git a/debian/patches/fix-music-player-substitution-issue b/debian/patches/fix-music-player-substitution-issue
new file mode 100644
index 00000000..a20ba2e1
--- /dev/null
+++ b/debian/patches/fix-music-player-substitution-issue
@@ -0,0 +1,43 @@
+Description: Fix music player substitution issue
+ Music player object file tried to feed error objects into string streams.
+ This patch only tries to stream the errors' strings.
+Last-Update: 2021-04-05
+
+--- r-tech1-1.0.0.orig/src/sound/music-player.cpp
++++ r-tech1-1.0.0/src/sound/music-player.cpp
+@@ -603,7 +603,7 @@ static void initializeMpg123(mpg123_hand
+ error = mpg123_open(*mp3, (char*) path.path().c_str());
+ if (error == -1){
+ std::ostringstream error;
+- error << "Could not open mpg123 file " << path.path() << " error code " << error;
++ error << "Could not open mpg123 file " << path.path() << " error code " << error.str();
+ throw MusicException(__FILE__,__LINE__, error.str());
+ }
+
+@@ -615,7 +615,7 @@ static void initializeMpg123(mpg123_hand
+ error = mpg123_read(*mp3, tempBuffer, sizeof(tempBuffer), &dont_care);
+ if (!(error == MPG123_OK || error == MPG123_NEW_FORMAT)){
+ std::ostringstream error;
+- error << "Could not read mpg123 file " << path.path() << " error code " << error;
++ error << "Could not read mpg123 file " << path.path() << " error code " << error.str();
+ throw MusicException(__FILE__,__LINE__, error.str());
+ }
+ mpg123_close(*mp3);
+@@ -624,7 +624,7 @@ static void initializeMpg123(mpg123_hand
+ error = mpg123_open(*mp3, (char*) path.path().c_str());
+ if (error == -1){
+ std::ostringstream error;
+- error << "Could not open mpg123 file " << path.path() << " error code " << error;
++ error << "Could not open mpg123 file " << path.path() << " error code " << error.str();
+ throw MusicException(__FILE__,__LINE__, error.str());
+ }
+ /* FIXME end */
+@@ -635,7 +635,7 @@ static void initializeMpg123(mpg123_hand
+ error = mpg123_decoder(*mp3, "generic");
+ if (error != MPG123_OK){
+ std::ostringstream error;
+- error << "Could not use 'generic' mpg123 decoder for " << path.path() << " error code " << error;
++ error << "Could not use 'generic' mpg123 decoder for " << path.path() << " error code " << error.str();
+ throw MusicException(__FILE__,__LINE__, error.str());
+ }
+ // Global::debug(0) << "mpg support " << mpg123_format_support(mp3, Sound::FREQUENCY, MPG123_ENC_SIGNED_16) << std::endl;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..1ac7b8e6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-music-player-substitution-issue

File Metadata

Mime Type
text/x-diff
Expires
Wed, Sep 10, 11:31 AM (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42584
Default Alt Text
(2 KB)

Event Timeline