baseparse: negotiation failure with eac3 stream, default caps are set to audio/x-ac3
The following video fails to play with a negotiation error:
The video contains two EAC3 streams, which matroskademux properly exposes as audio/x-eac3. ac3parse can also parse those streams independently with no issue.
However, during an initial GAP event, baseparse will report default caps with audio/x-ac3. Since ac3parse reports both audio/x-eac3 and audio/x-ac3 in its sink templates caps, baseparse incorrectly assumes ac3parse is able to convert from eac3 to ac3. decodebin then plugs an ac3 decoder, and the negotiation fails by the time ac3parse actually set audio/x-eac3 on its source pad.
The parser should be able to report it cannot determine the proper output caps yet, and prevent baseparse from setting wrong default caps.
There is already an old case describing a similar issue: gstreamer#263