+static int parse_programinformation(AVFormatContext *s, xmlNodePtr node)
+{
+ xmlChar *val = NULL;
+
+ node = xmlFirstElementChild(node);
+ while (node) {
+ if (!av_strcasecmp(node->name, "Title")) {
+ val = xmlNodeGetContent(node);
+ if (val) {
+ av_dict_set(&s->metadata, "Title", val, 0);
+ }
+ } else if (!av_strcasecmp(node->name, "Source")) {
+ val = xmlNodeGetContent(node);
+ if (val) {
+ av_dict_set(&s->metadata, "Source", val, 0);
+ }
+ } else if (!av_strcasecmp(node->name, "Copyright")) {
+ val = xmlNodeGetContent(node);
+ if (val) {
+ av_dict_set(&s->metadata, "Copyright", val, 0);
+ }
+ }
+ node = xmlNextElementSibling(node);
+ xmlFree(val);
+ val = NULL;
+ }
+ return 0;
+}
+