[FFmpeg-devel] [PATCH 1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by ""
Pierre-Anthony Lemieux
pal at sandflow.com
Tue Jul 25 07:35:22 EEST 2023
LGTM.
On Mon, Jul 24, 2023 at 5:46 PM Michael Niedermayer
<michael at niedermayer.cc> wrote:
>
> Suggested-by: Pierre-Anthony Lemieux <pal at sandflow.com>
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> 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;
> }
> --
> 2.17.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list