[FFmpeg-devel] [PATCH] JACOsub demuxer, decoder and muxer.

Michael Niedermayer michaelni at gmx.at
Tue Apr 17 16:06:45 CEST 2012


On Sun, Apr 15, 2012 at 07:18:15PM +0200, Clément Bœsch wrote:
[...]

> +static int insert_datetime(AVBPrint *dst, const char *in, const char *arg)
> +{
> +    char buf[16] = {0};
> +    time_t now = time(0);
> +    struct tm ltime;
> +
> +#if HAVE_LOCALTIME_R
> +    localtime_r(&now, &ltime);
> +#else
> +    ltime = *localtime(&now);
> +#endif
> +    strftime(buf, sizeof(buf), arg, &ltime);
> +    av_bprintf(dst, "%s", buf);
> +    return 0;
> +}

i wonder what use case this feature has ...



[...]

> +static int timed_line(const char *ptr)
> +{
> +    char c;
> +    return (sscanf(ptr, "%*u:%*u:%*u.%*u %*u:%*u:%*u.%*u %c", &c) == 1 ||



> +            sscanf(ptr, "@%*u @%*u %c",                       &c) == 1);

this looks a bit weak for AVPROBE_SCORE_MAX, can more be checked ?


also it probably makes sense to try the decoder/demxuer with zzuf
but overall the code looks good and IMHO can be pushed, future work
can be done in git (which is easier than resubmitting patches)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120417/86953b23/attachment.asc>


More information about the ffmpeg-devel mailing list