[FFmpeg-cvslog] avformat/imf: fix error CPL root element is absent

Pierre-Anthony Lemieux git at videolan.org
Wed Jan 5 13:31:59 EET 2022


ffmpeg | branch: release/5.0 | Pierre-Anthony Lemieux <pal at palemieux.com> | Mon Jan  3 22:11:27 2022 -0800| [5fd7b8e9b2cceae865ffd425a7895cccc76c0dba] | committer: Zane van Iperen

avformat/imf: fix error CPL root element is absent

Signed-off-by: Pierre-Anthony Lemieux <pal at palemieux.com>
Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>
(cherry picked from commit c1b55cb70ce748c1193d3251575b639daf9e96f0)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5fd7b8e9b2cceae865ffd425a7895cccc76c0dba
---

 libavformat/imf_cpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;



More information about the ffmpeg-cvslog mailing list