GStreamer 1.16 and earlier produced streams with HDMV registration id
but with Opus audio streams on the stream ID that AC-4 now uses. Make
sure those still play back by special casing the check for AC-4 in HDMV
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1295
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1296>
caps = gst_caps_new_empty_simple ("audio/x-eac3");
break;
case ST_BD_AUDIO_AC4:
- is_audio = TRUE;
- caps = gst_caps_new_empty_simple ("audio/x-ac4");
+ /* Opus also uses 0x06, and there are bad streams that have HDMV registration ID,
+ * but contain an Opus registration id, so check for it */
+ if (bstream->registration_id != DRF_ID_OPUS) {
+ is_audio = TRUE;
+ caps = gst_caps_new_empty_simple ("audio/x-ac4");
+ }
break;
case ST_BD_AUDIO_AC3_TRUE_HD:
is_audio = TRUE;