QVideoFrame constructor with QVideoFrameFormat fails
-
Hello!
I am using QVideoFrame::QVideoFrame(const QVideoFrameFormat &format) to create a new QVideoFrame and i might have found a little bug. For demonstration:QVideoFrame frame_dst_1 = QVideoFrame(frame_src); QVideoFrame frame_dst_2 = QVideoFrame(frame_src.surfaceFormat()); frame_dst_1.map(QVideoFrame::ReadOnly); frame_dst_2.map(QVideoFrame::ReadOnly); qDebug() << "frame_src : mappedBytes:" << frame_src.mappedBytes(0); qDebug() << "frame_dst_1: mappedBytes:" << frame_dst_1.mappedBytes(0); qDebug() << "frame_dst_2: mappedBytes:" << frame_dst_2.mappedBytes(0);result:
frame_src : mappedBytes: 983040
frame_dst_1: mappedBytes: 983040
frame_dst_2: mappedBytes: 921600The pixelFormat is Format_YUV420P. It happens on Debian 11 with Qt version 6.7.1, with Qt version 6.3.2 it works like expected.
I am just guessing, but maybe it is related to switching from gstreamer to ffmpeg... -
Report the issue to Qt’s bug tracker, mentioning the different mappedBytes values between Qt versions 6.7.1 and 6.3.2, and the potential link to the switch from gstreamer to ffmpeg.
-
Ok, thank you for your response.
I created a bug report.
https://bugreports.qt.io/browse/QTBUG-126359 -
N Nhan Nguyen moved this topic from General and Desktop on