mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +00:00
feat: change assert to Q_ASSERT
This commit is contained in:
parent
31efc0de25
commit
5240f52c9d
3 changed files with 6 additions and 6 deletions
|
@ -88,7 +88,7 @@ void ControlMsg::writePosition(QBuffer &buffer, const QRect& value)
|
|||
|
||||
quint16 ControlMsg::toFixedPoint16(float f)
|
||||
{
|
||||
assert(f >= 0.0f && f <= 1.0f);
|
||||
Q_ASSERT(f >= 0.0f && f <= 1.0f);
|
||||
quint32 u = f * 0x1p16f; // 2^16
|
||||
if (u >= 0xffff) {
|
||||
u = 0xffff;
|
||||
|
|
|
@ -315,7 +315,7 @@ void Recorder::stopRecorder() {
|
|||
|
||||
bool Recorder::push(const AVPacket *packet) {
|
||||
QMutexLocker locker(&m_mutex);
|
||||
assert(!m_stopped);
|
||||
Q_ASSERT(!m_stopped);
|
||||
|
||||
if (m_failed) {
|
||||
// reject any new packet (this will stop the stream)
|
||||
|
|
|
@ -233,8 +233,8 @@ bool Stream::recvPacket(AVPacket *packet)
|
|||
|
||||
quint64 pts = bufferRead64be(header);
|
||||
quint32 len = bufferRead32be(&header[8]);
|
||||
assert(pts == NO_PTS || (pts & 0x8000000000000000) == 0);
|
||||
assert(len);
|
||||
Q_ASSERT(pts == NO_PTS || (pts & 0x8000000000000000) == 0);
|
||||
Q_ASSERT(len);
|
||||
|
||||
if (av_new_packet(packet, len)) {
|
||||
qCritical("Could not allocate packet");
|
||||
|
@ -329,9 +329,9 @@ bool Stream::parse(AVPacket *packet)
|
|||
AV_NOPTS_VALUE, AV_NOPTS_VALUE, -1);
|
||||
|
||||
// PARSER_FLAG_COMPLETE_FRAMES is set
|
||||
assert(r == inLen);
|
||||
Q_ASSERT(r == inLen);
|
||||
(void) r;
|
||||
assert(outLen == inLen);
|
||||
Q_ASSERT(outLen == inLen);
|
||||
|
||||
if (m_parser->key_frame == 1) {
|
||||
packet->flags |= AV_PKT_FLAG_KEY;
|
||||
|
|
Loading…
Add table
Reference in a new issue