[vlc-commits] demux: ts: add timescale conversion helpers

Francois Cartegnie git at videolan.org
Sun Feb 22 16:43:59 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Feb 21 15:09:35 2015 +0100| [29533737b728017e38469841809fc5a5e2b39e33] | committer: Francois Cartegnie

demux: ts: add timescale conversion helpers

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29533737b728017e38469841809fc5a5e2b39e33
---

 modules/demux/ts.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index e9113d0..ea7e017 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -322,6 +322,9 @@ typedef struct
 #define MIN_ES_PID 4    /* Should be 32.. broken muxers */
 #define MAX_ES_PID 8190
 
+#define FROM_SCALE(x) (VLC_TS_0 + ((x) * 100 / 9))
+#define TO_SCALE(x)   (((x) - VLC_TS_0) * 9 / 100)
+
 struct demux_sys_t
 {
     stream_t   *stream;



More information about the vlc-commits mailing list