summaryrefslogtreecommitdiff
path: root/libavformat/imf_cpl.c
diff options
context:
space:
mode:
authorPierre-Anthony Lemieux <pal@palemieux.com>2022-01-03 22:11:27 -0800
committerZane van Iperen <zane@zanevaniperen.com>2022-01-05 14:26:42 +1000
commitc1b55cb70ce748c1193d3251575b639daf9e96f0 (patch)
treeeb5e9e48710a9694058a0214ffd74a9fa0c20462 /libavformat/imf_cpl.c
parent07fd34aca744d6ae64cd4756943ce508ee0f9973 (diff)
downloadffmpeg-c1b55cb70ce748c1193d3251575b639daf9e96f0.tar.gz
avformat/imf: fix error CPL root element is absent
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Diffstat (limited to 'libavformat/imf_cpl.c')
-rw-r--r--libavformat/imf_cpl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
index 7055b49ae8..28798d3e36 100644
--- a/libavformat/imf_cpl.c
+++ b/libavformat/imf_cpl.c
@@ -688,7 +688,7 @@ int ff_imf_parse_cpl_from_xml_dom(xmlDocPtr doc, FFIMFCPL **cpl)
}
cpl_element = xmlDocGetRootElement(doc);
- if (xmlStrcmp(cpl_element->name, "CompositionPlaylist")) {
+ if (!cpl_element || xmlStrcmp(cpl_element->name, "CompositionPlaylist")) {
av_log(NULL, AV_LOG_ERROR, "The root element of the CPL is not CompositionPlaylist\n");
ret = AVERROR_INVALIDDATA;
goto cleanup;