For deselected streams we set AVStream::discard to AVDISCARD_ALL. However, read_frame_internal() only honors this flag and discard packets when parsing is needed (AVStream::need_parsing && AVStream::parser). It's unclear to me whether this is a bug or the desired behavior. In any case, this violates the assertion in SampleProvider::QueuePacket() that we don't queue packets for deselected streams.
I changed the assertion in SampleProvider::QueuePacket() to a hard check so that we don't unnecessarily buffer packets for deselected streams.
For deselected streams we set AVStream::discard to AVDISCARD_ALL. However, read_frame_internal() only honors this flag and discard packets when parsing is needed (AVStream::need_parsing && AVStream::parser). It's unclear to me whether this is a bug or the desired behavior. In any case, this violates the assertion in SampleProvider::QueuePacket() that we don't queue packets for deselected streams.
I changed the assertion in SampleProvider::QueuePacket() to a hard check so that we don't unnecessarily buffer packets for deselected streams.