diff options
author | Artem Dyomin <artem.dyomin@qt.io> | 2022-11-10 13:33:36 +0100 |
---|---|---|
committer | Artem Dyomin <artem.dyomin@qt.io> | 2022-11-16 16:13:33 +0100 |
commit | be49af3b0f062fceef31711c67450ffbf595a808 (patch) | |
tree | c3bbc5cbab3215daa0c7981d21779e265c54b162 | |
parent | 77721ec69facafe3f3269bdd8a7fb6470587256d (diff) |
Fix camera ffmpeg crash
The commit just fixes typo made in one of recent commits.
Tests on local PC get passed after the fix.
Pick-to: 6.4
Change-Id: I4e4adf5f0f039867f0ecad5130e072169ab91eac
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
-rw-r--r-- | src/plugins/multimedia/ffmpeg/qffmpeghwaccel.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/multimedia/ffmpeg/qffmpeghwaccel.cpp b/src/plugins/multimedia/ffmpeg/qffmpeghwaccel.cpp index 67759d5c6..faf28081a 100644 --- a/src/plugins/multimedia/ffmpeg/qffmpeghwaccel.cpp +++ b/src/plugins/multimedia/ffmpeg/qffmpeghwaccel.cpp @@ -301,8 +301,14 @@ AVHWDeviceType HWAccel::deviceType() const void HWAccel::createFramesContext(AVPixelFormat swFormat, const QSize &size) { - if (m_hwDeviceContext) + if (m_hwFramesContext) { + qWarning() << "Frames context has been already created!"; return; + } + + if (!m_hwDeviceContext) + return; + m_hwFramesContext = av_hwframe_ctx_alloc(m_hwDeviceContext); auto *c = (AVHWFramesContext *)m_hwFramesContext->data; c->format = hwFormat(); |