From ae950606cbb769cdffa2ff013271988e7603d1cb Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Fri, 30 Dec 2022 18:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DJPEGTrack=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=B0=B1=E7=BB=AA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/JPEG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extension/JPEG.cpp b/src/Extension/JPEG.cpp index e5e57288..de024a03 100644 --- a/src/Extension/JPEG.cpp +++ b/src/Extension/JPEG.cpp @@ -8,7 +8,7 @@ namespace mediakit { bool JPEGTrack::inputFrame(const Frame::Ptr &frame) { if (!ready()) { - if ((_height & _width) > 0) { + if (_height > 0 && _width > 0) { if (_tmp == 0) _tmp = frame->dts(); else _fps = 1000.0 / (frame->dts() - _tmp); } else getVideoResolution((uint8_t*)frame->data(), frame->size());