validate:media-descriptor: Handle stream with no tags

It was segfaulting before.
This commit is contained in:
Thibault Saunier 2014-09-12 12:12:14 +02:00 committed by Mathieu Duponchelle
parent 8fb3e6112c
commit c8a99218de

View file

@ -147,11 +147,13 @@ serialize_filenode (GstMediaDescriptorWriter * writer)
}
tagsnode = snode->tags;
STR_APPEND3 (tagsnode->str_open);
for (tmp3 = tagsnode->tags; tmp3; tmp3 = tmp3->next) {
STR_APPEND4 (((TagNode *) tmp3->data)->str_open);
if (tagsnode) {
STR_APPEND3 (tagsnode->str_open);
for (tmp3 = tagsnode->tags; tmp3; tmp3 = tmp3->next) {
STR_APPEND4 (((TagNode *) tmp3->data)->str_open);
}
STR_APPEND3 (tagsnode->str_close);
}
STR_APPEND3 (tagsnode->str_close);
STR_APPEND2 (snode->str_close);
}