From 4649c4092fdadcd1115bb37d8f32368f1be75374 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 26 Sep 2014 09:59:29 +0200 Subject: [PATCH] qv4l2: init dest format when starting vbi/swradio streaming After streaming video first the destination format will be e.g. YUV, and vbi/swradio expect RGB24. So set that explicitly. Signed-off-by: Hans Verkuil --- utils/qv4l2/qv4l2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp index ad6d746..e59056c 100644 --- a/utils/qv4l2/qv4l2.cpp +++ b/utils/qv4l2/qv4l2.cpp @@ -1241,6 +1241,7 @@ void ApplicationWindow::capStart(bool start) error("no services possible\n"); return; } + m_capDestFormat.s_pixelformat(V4L2_PIX_FMT_RGB24); m_vbiTab->rawFormat(fmt.fmt.vbi); m_vbiWidth = fmt.fmt.vbi.samples_per_line; m_vbiHeight = fmt.fmt.vbi.count[0] + fmt.fmt.vbi.count[1]; @@ -1274,6 +1275,7 @@ void ApplicationWindow::capStart(bool start) return; } m_sdrSize = fmt.fmt.sdr.buffersize; + m_capDestFormat.s_pixelformat(V4L2_PIX_FMT_RGB24); m_frameData = new unsigned char[m_sdrSize]; m_capImage = new QImage(SDR_WIDTH, SDR_HEIGHT, dstFmt); m_capImage->fill(0); -- 2.7.4