Quoting Luca Barbato (2015-04-29 22:19:50)
> ---
> avprobe.c | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/avprobe.c b/avprobe.c
> index d969257..a22cb8f 100644
> --- a/avprobe.c
> +++ b/avprobe.c
> @@ -104,6 +104,10 @@ typedef struct PrintContext {
>
> void (*print_integer) (const char *key, int64_t value);
> void (*print_string) (const char *key, const char *value);
> +
> + void (*print_array_int) (const char *key,
> + const int *array,
> + const int size);
> } PrintContext;
>
> static AVIOContext *probe_out = NULL;
> @@ -201,6 +205,21 @@ static void ini_print_string(const char *key, const char
> *value)
> avio_w8(probe_out, '\n');
> }
>
> +static void ini_print_array_int(const char *key,
> + const int *array,
> + const int size)
> +{
> + int i;
> + if (size < 1)
> + return;
> +
> + ini_escape_print(key);
> + avio_printf(probe_out, "=%d", array[0]);
> + for (i = 1; i < size; i++)
> + avio_printf(probe_out, ", %d", array[i]);
Seems to me a combination of a comma and a space makes it harder to
parse. Just one of those would be enough, no?
--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel