static void generate_silence(uint8_t* buf, enum AVSampleFormat sample_fmt, size_t size)

{

    int fill_char = 0x00;

    if (sample_fmt == AV_SAMPLE_FMT_U8)

        fill_char = 0x80;

    memset(buf, fill_char, size);

}
