diff --git a/NEWS b/NEWS
index 2770f21dc..ed0fb23b7 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ ver 0.24 (not yet released)
- add option "mixramp_analyzer" to scan MixRamp tags on-the-fly
ver 0.23.6 (not yet released)
+* decoder
+ - opus: fix "readpicture" on Opus files
ver 0.23.5 (2021/12/01)
* protocol
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index c375aa58b..46533971c 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -17,8 +17,6 @@
-
-
-
diff --git a/android/src/Main.java b/android/src/Main.java
index 4f314f8aa..e40f03195 100644
--- a/android/src/Main.java
+++ b/android/src/Main.java
@@ -24,14 +24,13 @@ import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothClass;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
+import android.media.AudioManager;
import android.os.Build;
import android.os.IBinder;
import android.os.PowerManager;
@@ -200,24 +199,14 @@ public class Main extends Service implements Runnable {
return;
IntentFilter filter = new IntentFilter();
- filter.addAction(Intent.ACTION_HEADSET_PLUG);
- filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED);
- filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
+ filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
- if (!mPauseOnHeadphonesDisconnect) {
+ if (!mPauseOnHeadphonesDisconnect)
return;
- }
-
- if (intent.getAction().equals(Intent.ACTION_HEADSET_PLUG)) {
- if (intent.hasExtra("state") && intent.getIntExtra("state", 0) == 0)
- pause();
- } else {
- BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
- if (device.getBluetoothClass().hasService(BluetoothClass.Service.AUDIO))
- pause();
- }
+ if (intent.getAction() == AudioManager.ACTION_AUDIO_BECOMING_NOISY)
+ pause();
}
}, filter);
diff --git a/android/src/Receiver.java b/android/src/Receiver.java
index 6a6685720..1ba537ca6 100644
--- a/android/src/Receiver.java
+++ b/android/src/Receiver.java
@@ -25,16 +25,18 @@ import android.content.Intent;
import android.util.Log;
public class Receiver extends BroadcastReceiver {
- @Override
- public void onReceive(Context context, Intent intent) {
- Log.d("Receiver", "onReceive: " + intent);
- if (intent.getAction() == "android.intent.action.BOOT_COMPLETED") {
- if (Settings.Preferences.getBoolean(context,
- Settings.Preferences.KEY_RUN_ON_BOOT, false)) {
- final boolean wakelock = Settings.Preferences.getBoolean(context,
- Settings.Preferences.KEY_WAKELOCK, false);
- Main.start(context, wakelock);
- }
- }
- }
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ Log.d("Receiver", "onReceive: " + intent);
+ if (intent.getAction() == "android.intent.action.BOOT_COMPLETED") {
+ if (Settings.Preferences.getBoolean(context,
+ Settings.Preferences.KEY_RUN_ON_BOOT,
+ false)) {
+ final boolean wakelock =
+ Settings.Preferences.getBoolean(context,
+ Settings.Preferences.KEY_WAKELOCK, false);
+ Main.start(context, wakelock);
+ }
+ }
+ }
}
diff --git a/python/build/meson.py b/python/build/meson.py
index bb0b55a3f..2ad2904bb 100644
--- a/python/build/meson.py
+++ b/python/build/meson.py
@@ -53,19 +53,21 @@ pkgconfig = '{toolchain.pkg_config}'
f.write(f"""
[properties]
root = '{toolchain.install_prefix}'
-
-[built-in options]
-c_args = {repr((toolchain.cppflags + ' ' + toolchain.cflags).split())}
-c_link_args = {repr(toolchain.ldflags.split() + toolchain.libs.split())}
-
-cpp_args = {repr((toolchain.cppflags + ' ' + toolchain.cxxflags).split())}
-cpp_link_args = {repr(toolchain.ldflags.split() + toolchain.libs.split())}
""")
if 'android' in toolchain.arch:
f.write("""
# Keep Meson from executing Android-x86 test binariees
needs_exe_wrapper = true
+""")
+
+ f.write(f"""
+[built-in options]
+c_args = {repr((toolchain.cppflags + ' ' + toolchain.cflags).split())}
+c_link_args = {repr(toolchain.ldflags.split() + toolchain.libs.split())}
+
+cpp_args = {repr((toolchain.cppflags + ' ' + toolchain.cxxflags).split())}
+cpp_link_args = {repr(toolchain.ldflags.split() + toolchain.libs.split())}
""")
f.write(f"""
diff --git a/src/decoder/plugins/OpusTags.cxx b/src/decoder/plugins/OpusTags.cxx
index 6afdc2379..f7a44c19b 100644
--- a/src/decoder/plugins/OpusTags.cxx
+++ b/src/decoder/plugins/OpusTags.cxx
@@ -91,7 +91,8 @@ ScanOpusTags(const void *data, size_t size,
if (!r.Expect("OpusTags", 8))
return false;
- if (!handler.WantPair() && !handler.WantTag())
+ if (!handler.WantPair() && !handler.WantTag() &&
+ !handler.WantPicture())
return true;
if (!r.SkipString())
diff --git a/src/lib/alsa/Error.cxx b/src/lib/alsa/Error.cxx
index cd351f37d..8ceb4417c 100644
--- a/src/lib/alsa/Error.cxx
+++ b/src/lib/alsa/Error.cxx
@@ -29,6 +29,7 @@
#include "Error.hxx"
+#include
#include
namespace Alsa {
diff --git a/src/lib/alsa/Error.hxx b/src/lib/alsa/Error.hxx
index 4a827c403..0ba9292b3 100644
--- a/src/lib/alsa/Error.hxx
+++ b/src/lib/alsa/Error.hxx
@@ -50,4 +50,4 @@ MakeError(int error, const char *msg) noexcept
return std::system_error(error, error_category, msg);
}
-} // namespace Avahi
+} // namespace Alsa