summaryrefslogtreecommitdiff
path: root/music.cpp
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-01-03 20:50:59 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2011-01-03 20:50:59 +0100
commit3a3bab26aea5c064c07c307d1e8ccf463edae568 (patch)
tree8789f9cbec352268858f5c9c6a1d8e2b270a3d76 /music.cpp
parentb3c30578ae1709feb978b72d756d88c17941cad4 (diff)
Decoder, encoder and transcoder-related classes and factories now uses boost::shared_ptr.
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);