mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
修复JPEGTrack无法就绪的bug
This commit is contained in:
parent
fda77f0daf
commit
ae950606cb
@ -8,7 +8,7 @@ namespace mediakit {
|
|||||||
|
|
||||||
bool JPEGTrack::inputFrame(const Frame::Ptr &frame) {
|
bool JPEGTrack::inputFrame(const Frame::Ptr &frame) {
|
||||||
if (!ready()) {
|
if (!ready()) {
|
||||||
if ((_height & _width) > 0) {
|
if (_height > 0 && _width > 0) {
|
||||||
if (_tmp == 0) _tmp = frame->dts();
|
if (_tmp == 0) _tmp = frame->dts();
|
||||||
else _fps = 1000.0 / (frame->dts() - _tmp);
|
else _fps = 1000.0 / (frame->dts() - _tmp);
|
||||||
} else getVideoResolution((uint8_t*)frame->data(), frame->size());
|
} else getVideoResolution((uint8_t*)frame->data(), frame->size());
|
||||||
|
Loading…
Reference in New Issue
Block a user