From 2c2304a6fb665fb8fb009e9452bdf7f9b1c76b68 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Thu, 16 Jan 2025 12:15:42 +0900 Subject: [PATCH] qtdemux: Set codec to audio codec tag if it is an audio stream, otherwise set it to video codec tag - All codecs are set to audio codec tag, resulting in incorrect tags being generated and delivered. Change-Id: I777993d1df7a19b96d52c9ad3dffe05658e117d3 --- packaging/gstreamer.spec | 2 +- subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 21adea8159..0afb7a3569 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -60,7 +60,7 @@ Name: %{_name} Version: 1.24.11 -Release: 1 +Release: 2 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index 28abbbdeba..19264922e7 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -15979,9 +15979,21 @@ gst_qtdemux_handle_esds (GstQTDemux * qtdemux, QtDemuxStream * stream, entry->caps = caps; } +#ifdef TIZEN_FEATURE_QTDEMUX_MODIFICATION + if (codec_name && list) { + gboolean is_audio = FALSE; + const GstStructure *structure = gst_caps_get_structure(entry->caps, 0); + if (structure && gst_structure_has_name(structure, "audio")) + is_audio = TRUE; + + gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + is_audio ? GST_TAG_AUDIO_CODEC : GST_TAG_VIDEO_CODEC, codec_name, NULL); + } +#else if (codec_name && list) gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_AUDIO_CODEC, codec_name, NULL); +#endif /* Add the codec_data attribute to caps, if we have it */ if (data_ptr) { -- 2.34.1