Mercurial > libavformat.hg
diff nutenc.c @ 6246:79fc252c65cd libavformat
move ff_get_v_length and ff_put_v from nutenc.c to internal.h/aviobuf.c
patch by Micheal Chinen < mchinen gmail >
| author | janne |
|---|---|
| date | Fri, 09 Jul 2010 12:14:33 +0000 |
| parents | ef4606cc4fb3 |
| children | b3aea89a4f63 |
line wrap: on
line diff
--- a/nutenc.c Fri Jul 09 12:10:47 2010 +0000 +++ b/nutenc.c Fri Jul 09 12:14:33 2010 +0000 @@ -241,27 +241,6 @@ nut->frame_code['N'].flags= FLAG_INVALID; } -/** - * Get the length in bytes which is needed to store val as v. - */ -static int ff_get_v_length(uint64_t val){ - int i=1; - - while(val>>=7) - i++; - - return i; -} - -static void ff_put_v(ByteIOContext *bc, uint64_t val){ - int i= ff_get_v_length(val); - - while(--i>0) - put_byte(bc, 128 | (val>>(7*i))); - - put_byte(bc, val&127); -} - static void put_tt(NUTContext *nut, StreamContext *nus, ByteIOContext *bc, uint64_t val){ val *= nut->time_base_count; val += nus->time_base - nut->time_base;
