From e4770209dfde37f9945041d3b21fdf4cf4b51755 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 28 May 2013 12:59:00 +0200 Subject: [PATCH] Fix metadata handling. --- .../net/pterodactylus/sonitus/data/filter/ExternalMp3Decoder.java | 7 +------ .../net/pterodactylus/sonitus/data/filter/ExternalMp3Encoder.java | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalMp3Decoder.java b/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalMp3Decoder.java index f81d532..bc8e341 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalMp3Decoder.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalMp3Decoder.java @@ -44,16 +44,11 @@ public abstract class ExternalMp3Decoder extends ExternalFilter { } @Override - public Metadata metadata() { - return super.metadata().encoding("PCM"); - } - - @Override public void open(Metadata metadata) throws IOException { checkNotNull(metadata, "metadata must not be null"); checkState(metadata.encoding().equalsIgnoreCase("MP3"), "source must be MP3-encoded"); - super.open(metadata); + super.open(metadata.encoding("PCM")); } } diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalMp3Encoder.java b/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalMp3Encoder.java index 21654af..a5c6b7c 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalMp3Encoder.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/ExternalMp3Encoder.java @@ -44,16 +44,11 @@ public abstract class ExternalMp3Encoder extends ExternalFilter { } @Override - public Metadata metadata() { - return super.metadata().encoding("MP3"); - } - - @Override public void open(Metadata metadata) throws IOException { checkNotNull(metadata, "metadata must not be null"); checkState(metadata.encoding().equalsIgnoreCase("PCM"), "source must be PCM-encoded"); - super.open(metadata); + super.open(metadata.encoding("MP3")); } } -- 2.7.4