Some DVB and ATSC captures are using the official MPEG2 registration descriptor in addition to using the correct stream type and the AC-3_audio_stream_descriptor/AC3_descriptor. So let's add it even if it is not strictly needed for DVB/ATSC.
Unified · Split
| @@ -487,6 +487,10 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 486 unmodified lines | ||
| 487 | 487 | /* write optional descriptors here */ |
| 488 | 488 | switch (st->codecpar->codec_type) { |
| 489 | 489 | case AVMEDIA_TYPE_AUDIO: |
| 490 | + if (codec_id == AV_CODEC_ID_AC3) | |
| 491 | + put_registration_descriptor(&q, MKTAG('A', 'C', '-', '3')); | |
| 492 | + if (codec_id == AV_CODEC_ID_EAC3) | |
| 493 | + put_registration_descriptor(&q, MKTAG('E', 'A', 'C', '3')); | |
| 490 | 494 | if (ts->flags & MPEGTS_FLAG_SYSTEM_B) { |
| 491 | 495 | if (codec_id == AV_CODEC_ID_AC3) { |
| 492 | 496 | DVBAC3Descriptor *dvb_ac3_desc = ts_st->dvb_ac3_desc; |