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.
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
/* write optional descriptors here */
switch (st->codecpar->codec_type) {
case AVMEDIA_TYPE_AUDIO:
+ if (codec_id == AV_CODEC_ID_AC3)
+ put_registration_descriptor(&q, MKTAG('A', 'C', '-', '3'));
+ if (codec_id == AV_CODEC_ID_EAC3)
+ put_registration_descriptor(&q, MKTAG('E', 'A', 'C', '3'));
if (ts->flags & MPEGTS_FLAG_SYSTEM_B) {
if (codec_id == AV_CODEC_ID_AC3) {
DVBAC3Descriptor *dvb_ac3_desc = ts_st->dvb_ac3_desc;