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