Clean up frame unrefing

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Add motion JPEG encoder

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>