From: ionut Date: Tue, 21 Feb 2017 17:15:40 +0000 (+0200) Subject: Change the value of bit/pixel from channels to 8*channels because videos encoded X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1170^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a41d877fe6c7229e27d331fcc514150fd836bd73;p=platform%2Fupstream%2Fopencv.git Change the value of bit/pixel from channels to 8*channels because videos encoded by cap_mjpeg_encoder.cpp don't play on windows media player. Issue number #8113 --- diff --git a/modules/videoio/src/cap_mjpeg_encoder.cpp b/modules/videoio/src/cap_mjpeg_encoder.cpp index 201b284..0503f2f 100644 --- a/modules/videoio/src/cap_mjpeg_encoder.cpp +++ b/modules/videoio/src/cap_mjpeg_encoder.cpp @@ -720,7 +720,7 @@ public: strm.putInt(height); strm.putShort(1); // planes (1 means interleaved data (after decompression)) - strm.putShort(channels); // bits per pixel + strm.putShort(8 * channels); // bits per pixel strm.putInt(fourCC('M', 'J', 'P', 'G')); strm.putInt(width * height * channels); strm.putInt(0);