History

avformat/mpegtsenc: add registration descriptor for AC-3 and EAC3

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.

Limin Wang committed 6 years ago

Commit 4aa6eda1 parent 8f2c1f21 file · +4 −0Browse files

Unified · Split

libavformat/mpegtsenc.c+4−0
@@ -487,6 +487,10 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 486 unmodified lines
487 /* write optional descriptors here */487 /* write optional descriptors here */
488 switch (st->codecpar->codec_type) {488 switch (st->codecpar->codec_type) {
489 case AVMEDIA_TYPE_AUDIO: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 if (ts->flags & MPEGTS_FLAG_SYSTEM_B) {494 if (ts->flags & MPEGTS_FLAG_SYSTEM_B) {
491 if (codec_id == AV_CODEC_ID_AC3) {495 if (codec_id == AV_CODEC_ID_AC3) {
492 DVBAC3Descriptor *dvb_ac3_desc = ts_st->dvb_ac3_desc;496 DVBAC3Descriptor *dvb_ac3_desc = ts_st->dvb_ac3_desc;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t