summaryrefslogtreecommitdiff
path: root/libavformat/mpegtsenc.c
diff options
context:
space:
mode:
authorBrad Hards <bradh@frogmouth.net>2020-10-10 17:04:30 +1100
committerMarton Balint <cus@passwd.hu>2020-10-16 23:31:45 +0200
commitfcec7a6848e79d86bb63208e5d75c6a09acd3a84 (patch)
tree7b0d61656a5296ec8a66433e2850966340cf45aa /libavformat/mpegtsenc.c
parent15a74d21f3d7e8e6eca475903ef6252343861483 (diff)
avformat/mpegts: replace magic descriptor_tag values with defines
This takes the used values from ISO/IEC 13818-1 Table 2-45 and adds them to the mpegts.h header. No functional changes. 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 1687de74ad..afdaddad8e 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -275,7 +275,7 @@ static void putbuf(uint8_t **q_ptr, const uint8_t *buf, size_t len)
static void put_registration_descriptor(uint8_t **q_ptr, uint32_t tag)
{
uint8_t *q = *q_ptr;
- *q++ = 0x05; /* MPEG-2 registration descriptor*/
+ *q++ = REGISTRATION_DESCRIPTOR;
*q++ = 4;
*q++ = tag;
*q++ = tag >> 8;
@@ -600,7 +600,7 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
char *next = lang->value;
uint8_t *len_ptr;
- *q++ = 0x0a; /* ISO 639 language descriptor */
+ *q++ = ISO_639_LANGUAGE_DESCRIPTOR;
len_ptr = q++;
*len_ptr = 0;
@@ -728,7 +728,7 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
put_registration_descriptor(&q, MKTAG('K', 'L', 'V', 'A'));
} else if (codec_id == AV_CODEC_ID_TIMED_ID3) {
const char *tag = "ID3 ";
- *q++ = 0x26; /* metadata descriptor */
+ *q++ = METADATA_DESCRIPTOR;
*q++ = 13;
put16(&q, 0xffff); /* metadata application format */
putbuf(&q, tag, strlen(tag));