diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-09 22:37:28 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-09 22:37:28 +0400 |
commit | f13ea4e00c583d819f279a455d3f0a02e40ef0ae (patch) | |
tree | 5a2b305b2b29614e48e5b9047cb5894798820543 /libavformat/nut.c | |
parent | 9031aeb1cd8b0a5b5d4e6c11824a86c9c11ddcb2 (diff) |
move lsb2full to common file
Originally committed as revision 10025 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nut.c')
-rw-r--r-- | libavformat/nut.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/nut.c b/libavformat/nut.c index 4c41db35dc..91509afbd8 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -35,3 +35,10 @@ void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ AV_ROUND_DOWN); } } + +int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){ + int64_t mask = (1<<stream->msb_pts_shift)-1; + int64_t delta= stream->last_pts - mask/2; + return ((lsb - delta)&mask) + delta; +} + |