mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 06:16:36 +00:00
asfdemux: prefer WM/TrackNumber over WM/Track, it's more reliable
WM/Track has a 0 base but is often wrongly written as starting from 1, so not as reliable as WM/TrackNumber which always starts from 1.
This commit is contained in:
parent
1c88985618
commit
b84bf977b1
1 changed files with 12 additions and 2 deletions
|
@ -2465,8 +2465,18 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data,
|
||||||
|
|
||||||
if (G_IS_VALUE (&tag_value)) {
|
if (G_IS_VALUE (&tag_value)) {
|
||||||
if (gst_tag_name) {
|
if (gst_tag_name) {
|
||||||
gst_tag_list_add_values (taglist, GST_TAG_MERGE_APPEND,
|
GstTagMergeMode merge_mode = GST_TAG_MERGE_APPEND;
|
||||||
gst_tag_name, &tag_value, NULL);
|
|
||||||
|
/* WM/TrackNumber is more reliable than WM/Track, since the latter
|
||||||
|
* is supposed to have a 0 base but is often wrongly written to start
|
||||||
|
* from 1 as well, so prefer WM/TrackNumber when we have it: either
|
||||||
|
* replace the value added earlier from WM/Track or put it first in
|
||||||
|
* the list, so that it will get picked up by _get_uint() */
|
||||||
|
if (strcmp (name_utf8, "WM/TrackNumber") == 0)
|
||||||
|
merge_mode = GST_TAG_MERGE_REPLACE;
|
||||||
|
|
||||||
|
gst_tag_list_add_values (taglist, merge_mode, gst_tag_name,
|
||||||
|
&tag_value, NULL);
|
||||||
|
|
||||||
g_value_unset (&tag_value);
|
g_value_unset (&tag_value);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue