[FFmpeg-cvslog] avformat/imf_cpl: Replace NULL content_title_utf8 by ""

Michael Niedermayer git at videolan.org
Wed Jul 26 00:18:52 EEST 2023


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Jul 23 23:30:14 2023 +0200| [ac3e6b74bdd6959ce4411e78161b2f06d0926c43] | committer: Michael Niedermayer

avformat/imf_cpl: Replace NULL content_title_utf8 by ""

Suggested-by: Pierre-Anthony Lemieux <pal at sandflow.com>
Reviewed-by: Pierre-Anthony Lemieux <pal at sandflow.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/imf_cpl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
index 69155d786d..5f1a67443f 100644
--- a/libavformat/imf_cpl.c
+++ b/libavformat/imf_cpl.c
@@ -182,6 +182,10 @@ static int fill_content_title(xmlNodePtr cpl_element, FFIMFCPL *cpl)
     cpl->content_title_utf8 = xmlNodeListGetString(cpl_element->doc,
                                                    element->xmlChildrenNode,
                                                    1);
+    if (!cpl->content_title_utf8)
+        cpl->content_title_utf8 = xmlStrdup("");
+    if (!cpl->content_title_utf8)
+        return AVERROR(ENOMEM);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list