lavd/avfoundation: Using the actual stream index instead of hardcoded value.