In another forum biki3 told me that he has problems with mkv with ac3 and aac tracks. If you start with ac3 you can hear sound. Then switch to aac (which also works) and then back to ac3. Then you cannot here anything. If you start with aac track (works) and switch to ac3, you cannot hear anything.
Does anybody have an idea, what the problem is and how to solve it?
I found a solution for this . It's a little bug in the dvbaudiosink. Once an aac track was selected, self->aac_adts_header_valid was set to true. Changing audio track back to ac3 track didn't change that flag. This had the effect that always an aac adts header was added to the pes packet.
Attached is a patch to solve this problem.