qtdemux: Set codec to audio codec tag if it is an audio stream, 49/318349/5 accepted/tizen_unified_x_asan accepted/tizen/unified/20250205.095522 accepted/tizen/unified/20250205.113502 accepted/tizen/unified/x/20250212.043817 accepted/tizen/unified/x/asan/20250211.003420
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 16 Jan 2025 03:15:42 +0000 (12:15 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Mon, 3 Feb 2025 04:53:28 +0000 (13:53 +0900)
         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
subprojects/gst-plugins-good/gst/isomp4/qtdemux.c

index 21adea8159ebdf8b1118b77a1d5e3825e2306aed..0afb7a3569f2f0ce8e83e00245db96c9745ff235 100644 (file)
@@ -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
index 28abbbdeba77fdb46a9322c514798380e0e4cf2f..19264922e7315669c349d3cb2289a883156d9e26 100644 (file)
@@ -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) {