Revision 603e5c0b libavformat/nutenc.c

View differences:

libavformat/nutenc.c
241 241
    nut->frame_code['N'].flags= FLAG_INVALID;
242 242
}
243 243

  
244
/**
245
 * Get the length in bytes which is needed to store val as v.
246
 */
247
static int ff_get_v_length(uint64_t val){
248
    int i=1;
249

  
250
    while(val>>=7)
251
        i++;
252

  
253
    return i;
254
}
255

  
256
static void ff_put_v(ByteIOContext *bc, uint64_t val){
257
    int i= ff_get_v_length(val);
258

  
259
    while(--i>0)
260
        put_byte(bc, 128 | (val>>(7*i)));
261

  
262
    put_byte(bc, val&127);
263
}
264

  
265 244
static void put_tt(NUTContext *nut, StreamContext *nus, ByteIOContext *bc, uint64_t val){
266 245
    val *= nut->time_base_count;
267 246
    val += nus->time_base - nut->time_base;

Also available in: Unified diff