ffmpeg | branch: release/5.1 | Michael Niedermayer <[email protected]> | 
Sun Jul 23 23:30:14 2023 +0200| [9b5a8aa16d996f5c3d63a14401efcf7f44b718af] | 
committer: Michael Niedermayer

avformat/imf_cpl: Replace NULL content_title_utf8 by ""

Suggested-by: Pierre-Anthony Lemieux <[email protected]>
Reviewed-by: Pierre-Anthony Lemieux <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit ac3e6b74bdd6959ce4411e78161b2f06d0926c43)
Signed-off-by: Michael Niedermayer <[email protected]>

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

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

diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c
index a688a44711..3328a3ed18 100644
--- a/libavformat/imf_cpl.c
+++ b/libavformat/imf_cpl.c
@@ -177,6 +177,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;
 }

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to