[FFmpeg-devel] [RFC] lavu PTS printing utils

Michael Niedermayer michaelni at gmx.at
Sun Jan 15 20:18:19 CET 2012


On Sun, Jan 15, 2012 at 04:17:53PM +0100, Reimar Döffinger wrote:
> On Sun, Jan 15, 2012 at 04:07:27PM +0100, Stefano Sabatini wrote:
> > Hi,
> > 
> > I'm thinking to implement some convenience utils:
> > 
> > static inline size_t av_get_ts_string(char *buf, size_t buf_size, int64_t ts)
> > {
> >     return ts == (AV_NOPTS_VALUE) ? snprintf(buf, buf_size, "NOPTS") :
> >                                     snprintf(buf, buf_size, "%"PRId64"", ts);
> 
> At least leave out the pointless () and "".
> 
> > since it seems I need to use them again and again (debugging timestamp
> > issues in various components).
> 
> Quite a few places want them aligned though, and those won't work
> there.

it should be possible to handle this with a macro instead of a funct

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/20120115/6a13f673/attachment.asc>


More information about the ffmpeg-devel mailing list