diff options
author | Brad Hards <bradh@frogmouth.net> | 2020-06-09 01:01:24 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-06-09 01:01:28 +0200 |
commit | fb819697f6977981ab864214025e041ebf30f2b4 (patch) | |
tree | 2b461d1db9a65b40650ffd85597d799dd05610c7 /libavformat/mpegtsenc.c | |
parent | 81975cd24b043c853d5eeacbb2692a3a6f966034 (diff) |
avformat/mpegts: add constants for MPEG-TS transport stream identifiers
Signed-off-by: Brad Hards <bradh@frogmouth.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index b5ee48d015..d827ba3e28 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1382,28 +1382,28 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, is_dvb_teletext = 0; if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { if (st->codecpar->codec_id == AV_CODEC_ID_DIRAC) - *q++ = 0xfd; + *q++ = STREAM_ID_EXTENDED_STREAM_ID; else - *q++ = 0xe0; + *q++ = STREAM_ID_VIDEO_STREAM_0; } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && (st->codecpar->codec_id == AV_CODEC_ID_MP2 || st->codecpar->codec_id == AV_CODEC_ID_MP3 || st->codecpar->codec_id == AV_CODEC_ID_AAC)) { - *q++ = 0xc0; + *q++ = STREAM_ID_AUDIO_STREAM_0; } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && st->codecpar->codec_id == AV_CODEC_ID_AC3 && ts->m2ts_mode) { - *q++ = 0xfd; + *q++ = STREAM_ID_EXTENDED_STREAM_ID; } else if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA && st->codecpar->codec_id == AV_CODEC_ID_TIMED_ID3) { - *q++ = 0xbd; + *q++ = STREAM_ID_PRIVATE_STREAM_1; } else if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA) { - *q++ = stream_id != -1 ? stream_id : 0xfc; + *q++ = stream_id != -1 ? stream_id : STREAM_ID_METADATA_STREAM; - if (stream_id == 0xbd) /* asynchronous KLV */ + if (stream_id == STREAM_ID_PRIVATE_STREAM_1) /* asynchronous KLV */ pts = dts = AV_NOPTS_VALUE; } else { - *q++ = 0xbd; + *q++ = STREAM_ID_PRIVATE_STREAM_1; if (st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) { if (st->codecpar->codec_id == AV_CODEC_ID_DVB_SUBTITLE) { is_dvb_subtitle = 1; |