Minor enhancements to avformat use