[x265] [PATCH] csv: Fix corrupted command field in CSV summary with --abr-ladder option

Aruna Matheswaran aruna at multicorewareinc.com
Thu May 14 09:17:11 CEST 2020


Pushed to Release_3.4 and grafted the same into default.

On Tue, May 12, 2020 at 2:38 PM Aruna Matheswaran <
aruna at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Aruna Matheswaran <aruna at multicorewareinc.com>
> # Date 1589263821 -19800
> #      Tue May 12 11:40:21 2020 +0530
> # Node ID 50a7224c6a17fb6946dcaa5b8389359c388b8c84
> # Parent  1e3dbf09ee4f138c3bee6bf5a4bc3c9167b8f5e3
> csv: Fix corrupted command field in CSV summary with --abr-ladder option
>
> diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265.cpp
> --- a/source/x265.cpp   Wed May 06 18:40:34 2020 +0530
> +++ b/source/x265.cpp   Tue May 12 11:40:21 2020 +0530
> @@ -173,7 +173,8 @@
>          char *id = strtok(header, ":");
>          char *head[X265_HEAD_ENTRIES];
>          cliopt[i].encId = i;
> -
> +        cliopt[i].isAbrLadderConfig = true;
> +
>          while (id && (idCount <= X265_HEAD_ENTRIES))
>          {
>              head[idCount] = id;
> @@ -195,7 +196,7 @@
>          char* token = strtok(start, " ");
>          while (token)
>          {
> -            argv[argc++] = token;
> +            argv[argc++] = strdup(token);
>              token = strtok(NULL, " ");
>          }
>          argv[argc] = NULL;
> diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265cli.cpp
> --- a/source/x265cli.cpp        Wed May 06 18:40:34 2020 +0530
> +++ b/source/x265cli.cpp        Tue May 12 11:40:21 2020 +0530
> @@ -370,6 +370,13 @@
>
>      void CLIOptions::destroy()
>      {
> +        if (isAbrLadderConfig)
> +        {
> +            for (int idx = 1; idx < argCnt; idx++)
> +                free(argString[idx]);
> +            free(argString);
> +        }
> +
>          if (input)
>              input->release();
>          input = NULL;
> diff -r 1e3dbf09ee4f -r 50a7224c6a17 source/x265cli.h
> --- a/source/x265cli.h  Wed May 06 18:40:34 2020 +0530
> +++ b/source/x265cli.h  Tue May 12 11:40:21 2020 +0530
> @@ -405,6 +405,7 @@
>          char** argString;
>
>          /* ABR ladder settings */
> +        bool isAbrLadderConfig;
>          bool enableScaler;
>          char*    encName;
>          char*    reuseName;
> @@ -435,6 +436,7 @@
>              startTime = x265_mdate();
>              prevUpdateTime = 0;
>              bDither = false;
> +            isAbrLadderConfig = false;
>              enableScaler = false;
>              encName = NULL;
>              reuseName = NULL;
>


-- 
Regards,
*Aruna Matheswaran,*
Video Codec Engineer,
Media & AI analytics BU,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200514/7ca9fda3/attachment.html>


More information about the x265-devel mailing list