<div dir="ltr">Please ignore the previous patch and find the updated patch attached.<br>From 89161b8e14b11ad595de610704b70c0a3ccd81c0 Mon Sep 17 00:00:00 2001<br>From: Kirithika <<a href="mailto:kirithika@multicorewareinc.com">kirithika@multicorewareinc.com</a>><br>Date: Wed, 18 Sep 2024 14:52:12 +0530<br>Subject: [PATCH] Fix issue with left-over filename not being treated as input<br> parameter<br><br>---<br> source/x265cli.cpp | 10 ++++++----<br> 1 file changed, 6 insertions(+), 4 deletions(-)<br><br>diff --git a/source/x265cli.cpp b/source/x265cli.cpp<br>index ca7d9c973..ba0b620b7 100755<br>--- a/source/x265cli.cpp<br>+++ b/source/x265cli.cpp<br>@@ -598,6 +598,7 @@ namespace X265_NS {<br> for (int view = 0; view < MAX_VIEWS; view++)<br> {<br> inputfn[view] = X265_MALLOC(char, sizeof(char) * 1024);<br>+ memset(inputfn[view], 0, sizeof(char) * 1024);<br> }<br> const char* reconfn[MAX_LAYERS] = { NULL };<br> const char *outputfn = NULL;<br>@@ -805,10 +806,11 @@ namespace X265_NS {<br> }<br> }<br> <br>-#if !ENABLE_MULTIVIEW<br>- if (optind < argc && !inputfn[0])<br>- inputfn[0] = argv[optind++];<br>-#endif<br>+ if (param->numViews < 2)<br>+ {<br>+ if (optind < argc && !(*inputfn[0]))<br>+ strcpy(inputfn[0], argv[optind++]);<br>+ }<br> if (optind < argc && !outputfn)<br> outputfn = argv[optind++];<br> if (optind < argc)<br>-- <br>2.28.0.windows.1<br><br><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><i>Thanks,</i><div><i>Kirithika</i></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 27, 2024 at 10:12 AM Kirithika Kalirathnam <<a href="mailto:kirithika@multicorewareinc.com">kirithika@multicorewareinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">From 9bdaa0ace80a25523e6e66a4c792c4d81b7249a2 Mon Sep 17 00:00:00 2001<br>From: Kirithika <<a href="mailto:kirithika@multicorewareinc.com" target="_blank">kirithika@multicorewareinc.com</a>><br>Date: Wed, 18 Sep 2024 14:52:12 +0530<br>Subject: [PATCH] Fix issue with left-over filename not being treated as input<br> parameter<br><br>---<br> source/x265cli.cpp | 5 +++--<br> 1 file changed, 3 insertions(+), 2 deletions(-)<br><br>diff --git a/source/x265cli.cpp b/source/x265cli.cpp<br>index ca7d9c973..26f15d5c6 100755<br>--- a/source/x265cli.cpp<br>+++ b/source/x265cli.cpp<br>@@ -598,6 +598,7 @@ namespace X265_NS {<br> for (int view = 0; view < MAX_VIEWS; view++)<br> {<br> inputfn[view] = X265_MALLOC(char, sizeof(char) * 1024);<br>+ memset(inputfn[view], 0, sizeof(char) * 1024);<br> }<br> const char* reconfn[MAX_LAYERS] = { NULL };<br> const char *outputfn = NULL;<br>@@ -806,8 +807,8 @@ namespace X265_NS {<br> }<br> <br> #if !ENABLE_MULTIVIEW<br>- if (optind < argc && !inputfn[0])<br>- inputfn[0] = argv[optind++];<br>+ if (optind < argc && !(*inputfn[0]))<br>+ strcpy(inputfn[0], argv[optind++]);<br> #endif<br> if (optind < argc && !outputfn)<br> outputfn = argv[optind++];<br>-- <br>2.28.0.windows.1<br><br><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><i>Thanks,</i><div><i>Kirithika</i></div></div></div></div></div>
</blockquote></div>