changeset 2430:da0227bd105a libavformat

put_ebml_float()
author conrad
date Wed, 05 Sep 2007 00:22:47 +0000
parents 326e6fcf9f85
children 435ebfec86cf
files matroskaenc.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskaenc.c	Wed Sep 05 00:22:45 2007 +0000
+++ b/matroskaenc.c	Wed Sep 05 00:22:47 2007 +0000
@@ -67,6 +67,14 @@
 
 //static void put_ebml_sint(ByteIOContext *pb, unsigned int elementid, int64_t val)
 
+static void put_ebml_float(ByteIOContext *pb, unsigned int elementid, double val)
+{
+    // XXX: single-precision floats?
+    put_ebml_id(pb, elementid);
+    put_ebml_size(pb, 8, 0);
+    put_be64(pb, av_dbl2int(val));
+}
+
 static void put_ebml_binary(ByteIOContext *pb, unsigned int elementid,
                             const uint8_t *buf, int size)
 {