diff options
Diffstat (limited to 'music.cpp')
-rw-r--r-- | music.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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); |