dev/sanitizer-fixes-20140914

Minor fixes caught by playing around with some files with a build of mpv with `-fsanitizer=address,undefined` for ffmpeg and mpv itself.