comparison matroskaenc.c @ 2430:da0227bd105a libavformat

put_ebml_float()
author conrad
date Wed, 05 Sep 2007 00:22:47 +0000
parents 326e6fcf9f85
children 435ebfec86cf
comparison
equal deleted inserted replaced
2429:326e6fcf9f85 2430:da0227bd105a
64 for (bytes -= 1; bytes >= 0; bytes--) 64 for (bytes -= 1; bytes >= 0; bytes--)
65 put_byte(pb, val >> bytes*8); 65 put_byte(pb, val >> bytes*8);
66 } 66 }
67 67
68 //static void put_ebml_sint(ByteIOContext *pb, unsigned int elementid, int64_t val) 68 //static void put_ebml_sint(ByteIOContext *pb, unsigned int elementid, int64_t val)
69
70 static void put_ebml_float(ByteIOContext *pb, unsigned int elementid, double val)
71 {
72 // XXX: single-precision floats?
73 put_ebml_id(pb, elementid);
74 put_ebml_size(pb, 8, 0);
75 put_be64(pb, av_dbl2int(val));
76 }
69 77
70 static void put_ebml_binary(ByteIOContext *pb, unsigned int elementid, 78 static void put_ebml_binary(ByteIOContext *pb, unsigned int elementid,
71 const uint8_t *buf, int size) 79 const uint8_t *buf, int size)
72 { 80 {
73 put_ebml_id(pb, elementid); 81 put_ebml_id(pb, elementid);