mpegts: use GstMpegtsMetadataApplicationFormat in metadata descriptor

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
This commit is contained in:
jadarve 2024-06-04 14:39:05 -05:00 committed by GStreamer Marge Bot
parent 992a35b8f9
commit 0a57f361ce
2 changed files with 5 additions and 3 deletions

View file

@ -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;
}

View file

@ -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;