1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #913, source cycle error

This commit is contained in:
winlin 2017-06-11 09:40:07 +08:00
parent 7275fd5397
commit 7cac35a289
15 changed files with 161 additions and 152 deletions

View file

@ -524,9 +524,9 @@ SrsFormat::~SrsFormat()
srs_freep(buffer);
}
int SrsFormat::initialize()
srs_error_t SrsFormat::initialize()
{
return ERROR_SUCCESS;
return srs_success;
}
int SrsFormat::on_audio(int64_t timestamp, char* data, int size)

View file

@ -693,7 +693,7 @@ public:
virtual ~SrsFormat();
public:
// Initialize the format.
virtual int initialize();
virtual srs_error_t initialize();
// When got a parsed audio packet.
// @param data The data in FLV format.
virtual int on_audio(int64_t timestamp, char* data, int size);

View file

@ -3102,8 +3102,13 @@ SrsTsTransmuxer::~SrsTsTransmuxer()
int SrsTsTransmuxer::initialize(SrsFileWriter* fw)
{
int ret = ERROR_SUCCESS;
srs_error_t err = srs_success;
if ((ret = format->initialize()) != ERROR_SUCCESS) {
if ((err = format->initialize()) != srs_success) {
// TODO: FIXME: Use error.
ret = srs_error_code(err);
srs_freep(err);
return ret;
}