ffmpeg.c:504: error: Uninitialized Value
  The value read from best was never initialized.

ffmpeg.c:504:9: 
502.             av_log(st->codec, AV_LOG_WARNING, "Requested sampling rate unsupported using closest supported (%d)\n", best);
503.         }
504.         st->codec->sample_rate= best;
             ^
505.     }
506. }

static void choose_sample_rate(AVStream *st, AVCodec *codec)
{
    if(codec && codec->supported_samplerates){
        const int *p= codec->supported_samplerates;
        int best;
        int best_dist=INT_MAX;
        for(; *p; p++){
            int dist= abs(st->codec->sample_rate - *p);
            if(dist < best_dist){
                best_dist= dist;
                best= *p;
            }
        }
        if(best_dist){
            av_log(st->codec, AV_LOG_WARNING, "Requested sampling rate unsupported using closest supported (%d)\n", best);
        }
        st->codec->sample_rate= best;
    }
}
['static void choose_sample_rate(AVStream *st, AVCodec *codec)\n{\n    if(codec && codec->supported_samplerates){\n        const int *p= codec->supported_samplerates;\n        int best;\n        int best_dist=INT_MAX;\n        for(; *p; p++){\n            int dist= abs(st->codec->sample_rate - *p);\n            if(dist < best_dist){\n                best_dist= dist;\n                best= *p;\n            }\n        }\n        if(best_dist){\n            av_log(st->codec, AV_LOG_WARNING, "Requested sampling rate unsupported using closest supported (%d)\\n", best);\n        }\n        st->codec->sample_rate= best;\n    }\n}']