avformat/imf_cpl: Replace NULL content_title_utf8 by ""

Suggested-by: Pierre-Anthony Lemieux <pal@sandflow.com>
Reviewed-by: Pierre-Anthony Lemieux <pal@sandflow.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2023-07-23 23:30:14 +02:00
parent 509ce40f18
commit ac3e6b74bd
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 4 additions and 0 deletions

View File

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