/* Read the next element as a float. 0 is success, < 0 is failure.  */
static int ebml_read_float(ByteIOContext *pb, int size, double *num)
/* Read the next element as a float. 0 is success, < 0 is failure.  */
static int ebml_read_float(ByteIOContext *pb, int size, double *num)
{
    if (size == 4) {
        *num= av_int2flt(get_be32(pb));
    } else if(size==8){
        *num= av_int2dbl(get_be64(pb));
    } else
        return AVERROR_INVALIDDATA;
    return 0;
}