From 0a57f361ceebcb03de89aa2e11c96981277f04b9 Mon Sep 17 00:00:00 2001 From: jadarve Date: Tue, 4 Jun 2024 14:39:05 -0500 Subject: [PATCH] mpegts: use GstMpegtsMetadataApplicationFormat in metadata descriptor Part-of: --- .../gst-libs/gst/mpegts/gstmpegtsdescriptor.c | 6 ++++-- .../gst-libs/gst/mpegts/gstmpegtsdescriptor.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/mpegts/gstmpegtsdescriptor.c b/subprojects/gst-plugins-bad/gst-libs/gst/mpegts/gstmpegtsdescriptor.c index a137240c7c..f65abf778e 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/mpegts/gstmpegtsdescriptor.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/mpegts/gstmpegtsdescriptor.c @@ -1283,7 +1283,8 @@ gst_mpegts_descriptor_from_metadata (const GstMpegtsMetadataDescriptor * gst_byte_writer_put_uint16_be (&writer, metadata_descriptor->metadata_application_format); - if (metadata_descriptor->metadata_application_format == 0xFFFF) { + if (metadata_descriptor->metadata_application_format == + GST_MPEGTS_METADATA_APPLICATION_FORMAT_IDENTIFIER_FIELD) { gst_byte_writer_put_uint32_be (&writer, metadata_descriptor->metadata_format_identifier); // metadata_application_format_identifier } @@ -1339,7 +1340,8 @@ gst_mpegts_descriptor_parse_metadata (const GstMpegtsDescriptor * descriptor, res->metadata_application_format = GST_READ_UINT16_BE (data); data += 2; - if (res->metadata_application_format == 0xFFFF) { + if (res->metadata_application_format == + GST_MPEGTS_METADATA_APPLICATION_FORMAT_IDENTIFIER_FIELD) { // skip over metadata_application_format_identifier if it is provided data += 4; } diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/mpegts/gstmpegtsdescriptor.h b/subprojects/gst-plugins-bad/gst-libs/gst/mpegts/gstmpegtsdescriptor.h index bf293a6e08..2d9884520c 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/mpegts/gstmpegtsdescriptor.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/mpegts/gstmpegtsdescriptor.h @@ -489,7 +489,7 @@ metadata_service_id to identify the metadata service to which the metadata descr */ struct _GstMpegtsMetadataDescriptor { - guint16 metadata_application_format; + GstMpegtsMetadataApplicationFormat metadata_application_format; GstMpegtsMetadataFormat metadata_format; guint32 metadata_format_identifier; guint8 metadata_service_id;