comparison nut.c @ 699:2f5f4578a076 libavformat

"put_s should store signed values. Spotted on #mplayerdev by someone I don't remember." patch by (Luca Barbato [lu_zero gentoo org)
author michael
date Sun, 13 Mar 2005 01:58:29 +0000
parents 095009fc2f35
children d79164865a7c
comparison
equal deleted inserted replaced
698:829c5c8e5cf2 699:2f5f4578a076
418 418
419 put_v(bc, len); 419 put_v(bc, len);
420 put_buffer(bc, string, len); 420 put_buffer(bc, string, len);
421 } 421 }
422 422
423 static void put_s(ByteIOContext *bc, uint64_t val){ 423 static void put_s(ByteIOContext *bc, int64_t val){
424 if (val<=0) put_v(bc, -2*val ); 424 if (val<=0) put_v(bc, -2*val );
425 else put_v(bc, 2*val-1); 425 else put_v(bc, 2*val-1);
426 } 426 }
427 427
428 static void put_vb(ByteIOContext *bc, uint64_t val){ 428 static void put_vb(ByteIOContext *bc, uint64_t val){