mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-21 23:00:04 +08:00
Fix warning:
ffmpeg.c: In function 'new_audio_stream': ffmpeg.c:665: warning: 'best' may be used uninitialized in this function ffmpeg.c:665: note: 'best' was declared here Originally committed as revision 24033 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
2
ffmpeg.c
2
ffmpeg.c
@ -662,7 +662,7 @@ static void choose_sample_rate(AVStream *st, AVCodec *codec)
|
|||||||
{
|
{
|
||||||
if(codec && codec->supported_samplerates){
|
if(codec && codec->supported_samplerates){
|
||||||
const int *p= codec->supported_samplerates;
|
const int *p= codec->supported_samplerates;
|
||||||
int best;
|
int best;//=0;
|
||||||
int best_dist=INT_MAX;
|
int best_dist=INT_MAX;
|
||||||
for(; *p; p++){
|
for(; *p; p++){
|
||||||
int dist= abs(st->codec->sample_rate - *p);
|
int dist= abs(st->codec->sample_rate - *p);
|
||||||
|
Reference in New Issue
Block a user