Fix some memory leaks, and also don't print negative timestamps (and bitrates).