init player when receiving a header message

This commit is contained in:
badaix 2016-01-31 23:56:28 +01:00
parent 94944681c2
commit 7b1323646f
12 changed files with 149 additions and 117 deletions

View file

@ -17,10 +17,12 @@
***/
#include "encoderFactory.h"
#include "common/utils.h"
#include "pcmEncoder.h"
#include "oggEncoder.h"
#include "flacEncoder.h"
#include "common/utils.h"
#include "common/snapException.h"
#include "common/log.h"
using namespace std;
@ -44,8 +46,7 @@ Encoder* EncoderFactory::createEncoder(const std::string& codecSettings) const
encoder = new FlacEncoder(codecOptions);
else
{
cout << "unknown codec: " << codec << "\n";
return NULL;
throw SnapException("unknown codec: " + codec);
}
return encoder;