don't declare the variable every turn of the loop

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
move thread initialization to its own function

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
set colorspace meta in producer

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
notify format in get_image

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
fix frame_rate num/den order.

* fixes avformat bitrate issue
* breaks sdl

Signed-off-by: Tomas Neme <lacrymology@gmail.com>