Skip to content

Instantly share code, notes, and snippets.

@lightfromshadows
lightfromshadows / MJPEGStreamDecoder.cs
Created October 15, 2019 19:16
Simple MJPEG stream decoder for Unity written in C#
/*
* I needed a simple MJPEG Stream Decoder and I couldn't find one that worked for me.
*
* It reads a response stream and when there's a new frame it updates the render texture.
* That's it. No authenication or options.
* It's something stupid simple for readimg a video stream from an equally stupid simple Arduino.
*
* I fixed most of the large memory leaks, but there's at least one small one left.
*/