static char *b64_encode( unsigned char *src )
static char *b64_encode( const unsigned char *src )
static char *b64_encode( unsigned char *src ){    static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";    unsigned int len= strlen(src);    char *ret, *dst;    unsigned i_bits = 0;    unsigned i_shift = 0;    if(len < UINT_MAX/4){        ret=dst= av_malloc( len * 4 / 3 + 12 );    }else        return NULL;    for( ;; )    {        if( *src )        {            i_bits = ( i_bits << 8 )|( *src++ );            i_shift += 8;        }        else if( i_shift > 0 )        {           i_bits <<= 6 - i_shift;           i_shift = 6;        }        else        {            *dst++ = '=';            break;        }                                                                                        while( i_shift >= 6 )        {            i_shift -= 6;            *dst++ = b64[(i_bits >> i_shift)&0x3f];        }    }                                                                                    *dst++ = '\0';                                                                                    return ret;}