From 2143f7cee111514dab24fab3dd79a9f320678054 Mon Sep 17 00:00:00 2001 From: Josh Veitch-Michaelis Date: Tue, 12 Mar 2019 05:26:51 +0000 Subject: [PATCH] release frame after disabling convert rgb --- modules/videoio/src/cap_v4l.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp index 822f37344f..c79d9044a9 100644 --- a/modules/videoio/src/cap_v4l.cpp +++ b/modules/videoio/src/cap_v4l.cpp @@ -1803,9 +1803,11 @@ bool CvCaptureCAM_V4L::setProperty( int property_id, double _value ) if (bool(value)) { convert_rgb = convertableToRgb(); return convert_rgb; + }else{ + convert_rgb = false; + releaseFrame(); + return true; } - convert_rgb = false; - return true; case cv::CAP_PROP_FOURCC: { if (palette == static_cast<__u32>(value))