Hand in changed metadata to superclass.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / filter / OggVorbisDecoder.java
index 5ea2d48..93ff3aa 100644 (file)
@@ -47,6 +47,7 @@ public class OggVorbisDecoder extends ExternalFilter {
         *              The location of the binary
         */
        public OggVorbisDecoder(String binary) {
+               super("Ogg Vorbis Decoder");
                this.binary = binary;
        }
 
@@ -67,16 +68,11 @@ public class OggVorbisDecoder 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");
                checkArgument(metadata.encoding().equalsIgnoreCase("Vorbis"), "source must be Vorbis-encoded");
 
-               super.open(metadata);
+               super.open(metadata.encoding("PCM"));
        }
 
        //