Skip to content

Commit a41d877

Browse files
author
ionut
committed
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 opencv#8113
1 parent 9053839 commit a41d877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/videoio/src/cap_mjpeg_encoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ class MotionJpegWriter : public IVideoWriter
720720
strm.putInt(height);
721721
strm.putShort(1); // planes (1 means interleaved data (after decompression))
722722

723-
strm.putShort(channels); // bits per pixel
723+
strm.putShort(8 * channels); // bits per pixel
724724
strm.putInt(fourCC('M', 'J', 'P', 'G'));
725725
strm.putInt(width * height * channels);
726726
strm.putInt(0);

0 commit comments

Comments
 (0)