summaryrefslogtreecommitdiff
path: root/music.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'music.cpp')
-rw-r--r--music.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/music.cpp b/music.cpp
index fcc0daf..15ddbba 100644
--- a/music.cpp
+++ b/music.cpp
@@ -133,12 +133,10 @@ void MusicTrack::render(HTTP::Connection::p req) {
delete t;
if(req->args.count("decoder") && req->args.count("encoder")) {
- DecoderBase *d = decoder::get_decoder(req->args["decoder"]);
- EncoderBase *e = encoder::get_encoder(req->args["encoder"]);
- Transcoder t(path.string(), req, *d, *e);
+ DecoderFilter::p d = decoder::get_decoder(req->args["decoder"]);
+ EncoderFilter::p e = encoder::get_encoder(req->args["encoder"]);
+ Transcoder t(path.string(), req, d, e);
t.run();
- delete d;
- delete e;
} else {
fs::ifstream is(path, std::ios::in | std::ios::binary);
is.seekg(0, std::ios::end);