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>
This commit is contained in:
Pierre-Anthony Lemieux 2022-01-03 22:11:27 -08:00 committed by Zane van Iperen
parent 07fd34aca7
commit c1b55cb70c
No known key found for this signature in database
GPG Key ID: 68616B2D8AC4DCC5
1 changed files with 1 additions and 1 deletions

View File

@ -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;