Message ID | 20230725004609.17750-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | ac3e6b74bdd6959ce4411e78161b2f06d0926c43 |
Headers | show |
Series | [FFmpeg-devel,1/3] avformat/imf_cpl: Replace NULL content_title_utf8 by "" | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
LGTM. On Mon, Jul 24, 2023 at 5:46 PM Michael Niedermayer <michael@niedermayer.cc> wrote: > > Suggested-by: Pierre-Anthony Lemieux <pal@sandflow.com> > Signed-off-by: Michael Niedermayer <michael@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@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
On Mon, Jul 24, 2023 at 09:35:22PM -0700, Pierre-Anthony Lemieux wrote:
> LGTM.
will apply
thx
[...]
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; }
Suggested-by: Pierre-Anthony Lemieux <pal@sandflow.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/imf_cpl.c | 4 ++++ 1 file changed, 4 insertions(+)