[FFmpeg-devel] SCTE-35 development

Clément Bœsch u at pkh.me
Tue Dec 30 11:26:31 CET 2014


On Tue, Dec 30, 2014 at 03:42:16PM +0530, Anshul wrote:
[...]
> diff --git a/libavutil/avstring.c b/libavutil/avstring.c
> index 25c65b4..a866ee3 100644
> --- a/libavutil/avstring.c
> +++ b/libavutil/avstring.c
> @@ -144,6 +144,31 @@ char *av_d2str(double d)
>      return str;
>  }
>  
> +char *av_int2str(int i)
> +{
> +    char *str = av_malloc(16);
> +    if (str)
> +        snprintf(str, 16, "%d", i);
> +    return str;
> +}
> +char *av_uint2str(unsigned int i)
> +{
> +    char *str = av_malloc(16);
> +    if (str)
> +        snprintf(str, 16, "%u", i);
> +    return str;
> +}
> +/**
> + * 0xff ff ff ff ff ff ff ff = 18446744073709551615
> + * therefor taking 20 digit
> + */
> +char *av_uint64_t2str(uint64_t val)
> +{
> +    char *str = av_malloc(20);
> +    if (str)
> +        snprintf(str, 20, "%llu", val);
> +    return str;
> +}

What are these for? They look unused.

They are also probably useless since you can use av_asprintf() directly.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141230/77182553/attachment.asc>


More information about the ffmpeg-devel mailing list