Use a looping thread to trigger refreshes
Merge remote-tracking branch 'scrawl/videoplayback' into videoplayback
added black bars
use sample_aspect_ratio if available
Don't leak the IO context if avformat_open_input fails
fixed fog in some cells
change destruction order to fix crash on exit when a video is playing
Merge branch 'videoplayback' of https://github.com/ChrisKCat/openmw into videoplayback
fix 2 unrelated leaks
Only use one stream for the ffmpeg decoder
Only store one packet at a time
Update the ffmpeg decoder to use avcodec_decode_audio4
Merge the stream struct into the parent decoder
More fixes for the audio clock

The audio_clock for the decoder represents the end of the current packet, so it
needs to be adjusted back to match the position that's actually going to be
read next.
Move audio_clock to the decoder where it's used
Use the packet pts to calculate the decoder sample offset
Avoid double-setting the material texture
Remove the stream indices from the VideoState
Remove a redundant check
We no longer need SDL