mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
qtdemux: make sure taglist is writable before adding tags
Avoids assertions
This commit is contained in:
parent
78dfdee2aa
commit
7c12435f9b
1 changed files with 10 additions and 5 deletions
|
@ -9215,6 +9215,8 @@ qtdemux_parse_udta (GstQTDemux * qtdemux, GNode * udta)
|
||||||
if (!qtdemux->tag_list) {
|
if (!qtdemux->tag_list) {
|
||||||
qtdemux->tag_list = gst_tag_list_new_empty ();
|
qtdemux->tag_list = gst_tag_list_new_empty ();
|
||||||
gst_tag_list_set_scope (qtdemux->tag_list, GST_TAG_SCOPE_GLOBAL);
|
gst_tag_list_set_scope (qtdemux->tag_list, GST_TAG_SCOPE_GLOBAL);
|
||||||
|
} else {
|
||||||
|
qtdemux->tag_list = gst_tag_list_make_writable (qtdemux->tag_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -9473,6 +9475,14 @@ qtdemux_parse_tree (GstQTDemux * qtdemux)
|
||||||
GstDateTime *datetime = NULL;
|
GstDateTime *datetime = NULL;
|
||||||
gint version;
|
gint version;
|
||||||
|
|
||||||
|
/* make sure we have a usable taglist */
|
||||||
|
if (!qtdemux->tag_list) {
|
||||||
|
qtdemux->tag_list = gst_tag_list_new_empty ();
|
||||||
|
gst_tag_list_set_scope (qtdemux->tag_list, GST_TAG_SCOPE_GLOBAL);
|
||||||
|
} else {
|
||||||
|
qtdemux->tag_list = gst_tag_list_make_writable (qtdemux->tag_list);
|
||||||
|
}
|
||||||
|
|
||||||
mvhd = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_mvhd);
|
mvhd = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_mvhd);
|
||||||
if (mvhd == NULL) {
|
if (mvhd == NULL) {
|
||||||
GST_LOG_OBJECT (qtdemux, "No mvhd node found, looking for redirects.");
|
GST_LOG_OBJECT (qtdemux, "No mvhd node found, looking for redirects.");
|
||||||
|
@ -9512,11 +9522,6 @@ qtdemux_parse_tree (GstQTDemux * qtdemux)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (datetime) {
|
if (datetime) {
|
||||||
if (!qtdemux->tag_list) {
|
|
||||||
qtdemux->tag_list = gst_tag_list_new_empty ();
|
|
||||||
gst_tag_list_set_scope (qtdemux->tag_list, GST_TAG_SCOPE_GLOBAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Use KEEP as explicit tags should have a higher priority than mvhd tag */
|
/* Use KEEP as explicit tags should have a higher priority than mvhd tag */
|
||||||
gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_KEEP, GST_TAG_DATE_TIME,
|
gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_KEEP, GST_TAG_DATE_TIME,
|
||||||
datetime, NULL);
|
datetime, NULL);
|
||||||
|
|
Loading…
Reference in a new issue