Commit b7f4eae2 by xia-chu

修复bug

parent e4904623
......@@ -54,7 +54,7 @@ DecoderImp::Ptr DecoderImp::createDecoder(Type type, MediaSinkInterface *sink){
return DecoderImp::Ptr(new DecoderImp(decoder, sink));
}
size_t DecoderImp::input(const uint8_t *data, size_t bytes){
ssize_t DecoderImp::input(const uint8_t *data, size_t bytes){
return _decoder->input(data, bytes);
}
......
......@@ -25,7 +25,7 @@ public:
typedef std::function<void(int stream, int codecid, int flags, int64_t pts, int64_t dts, const void *data, size_t bytes)> onDecode;
typedef std::function<void(int stream, int codecid, const void *extra, size_t bytes, int finish)> onStream;
virtual size_t input(const uint8_t *data, size_t bytes) = 0;
virtual ssize_t input(const uint8_t *data, size_t bytes) = 0;
virtual void setOnDecode(onDecode cb) = 0;
virtual void setOnStream(onStream cb) = 0;
......@@ -57,7 +57,7 @@ public:
~DecoderImp() = default;
static Ptr createDecoder(Type type, MediaSinkInterface *sink);
size_t input(const uint8_t *data, size_t bytes);
ssize_t input(const uint8_t *data, size_t bytes);
protected:
void onTrack(const Track::Ptr &track);
......
......@@ -44,7 +44,7 @@ PSDecoder::~PSDecoder() {
ps_demuxer_destroy((struct ps_demuxer_t*)_ps_demuxer);
}
size_t PSDecoder::input(const uint8_t *data, size_t bytes) {
ssize_t PSDecoder::input(const uint8_t *data, size_t bytes) {
return ps_demuxer_input((struct ps_demuxer_t*)_ps_demuxer,data,bytes);
}
......
......@@ -21,7 +21,7 @@ class PSDecoder : public Decoder {
public:
PSDecoder();
~PSDecoder();
size_t input(const uint8_t* data, size_t bytes) override;
ssize_t input(const uint8_t* data, size_t bytes) override;
void setOnDecode(onDecode cb) override;
void setOnStream(onStream cb) override;
......
......@@ -77,7 +77,7 @@ TSDecoder::~TSDecoder() {
ts_demuxer_destroy(_demuxer_ctx);
}
size_t TSDecoder::input(const uint8_t *data, size_t bytes) {
ssize_t TSDecoder::input(const uint8_t *data, size_t bytes) {
if (TSSegment::isTSPacket((char *)data, bytes)) {
return ts_demuxer_input(_demuxer_ctx, (uint8_t *) data, bytes);
}
......
......@@ -45,7 +45,7 @@ class TSDecoder : public Decoder {
public:
TSDecoder();
~TSDecoder();
size_t input(const uint8_t* data, size_t bytes) override ;
ssize_t input(const uint8_t* data, size_t bytes) override ;
void setOnDecode(onDecode cb) override;
void setOnStream(onStream cb) override;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论