diff options
author | phintuka <phintuka> | 2009-07-01 09:56:26 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2009-07-01 09:56:26 +0000 |
commit | 76c75b28a51f33dae38d7842074eb6871e61539b (patch) | |
tree | 84f9616802fba3fed15549471fbee88ae08acbcd | |
parent | c64f15775ff0d41cf779c17fc3f76442f68035ee (diff) | |
download | xineliboutput-76c75b28a51f33dae38d7842074eb6871e61539b.tar.gz xineliboutput-76c75b28a51f33dae38d7842074eb6871e61539b.tar.bz2 |
pts_to_ms(), ms_to_pts()
-rw-r--r-- | tools/pes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/pes.h b/tools/pes.h index bd6be7c9..d25374a7 100644 --- a/tools/pes.h +++ b/tools/pes.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: pes.h,v 1.12 2009-07-01 09:31:17 phintuka Exp $ + * $Id: pes.h,v 1.13 2009-07-01 09:56:26 phintuka Exp $ * */ @@ -64,6 +64,8 @@ extern "C" { * timestamps */ +static inline int pts_to_ms(int64_t pts) { return (int)(pts/INT64_C(90)); } +static inline int64_t ms_to_pts(int ms) { return ((int64_t)(ms)) * INT64_C(90); } int64_t pes_get_pts(const uint8_t *buf, int len); int64_t pes_get_dts(const uint8_t *buf, int len); |