diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-30 11:02:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-30 11:02:15 +0200 |
commit | d40e2c7a86171e67e6bf112dbd65c6e736d5eda8 (patch) | |
tree | b70dd749b1069639b18c3151242be179ef67862e /libavfilter/avfiltergraph.c | |
parent | 5e363bb9b3d8d0f6a0945caccd242498c5a92287 (diff) | |
download | ffmpeg-d40e2c7a86171e67e6bf112dbd65c6e736d5eda8.tar.gz |
avfiltergraph: kill uninitialized variable warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r-- | libavfilter/avfiltergraph.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 8a5f106886..7ab1124f29 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -630,7 +630,7 @@ static void swap_channel_layouts_on_filter(AVFilterContext *filter) for (i = 0; i < filter->nb_outputs; i++) { AVFilterLink *outlink = filter->outputs[i]; - int best_idx, best_score = INT_MIN, best_count_diff = INT_MAX; + int best_idx = -1, best_score = INT_MIN, best_count_diff = INT_MAX; if (outlink->type != AVMEDIA_TYPE_AUDIO || outlink->in_channel_layouts->nb_channel_layouts < 2) @@ -679,6 +679,7 @@ static void swap_channel_layouts_on_filter(AVFilterContext *filter) best_count_diff = count_diff; } } + av_assert1(best_idx>=0); FFSWAP(uint64_t, outlink->in_channel_layouts->channel_layouts[0], outlink->in_channel_layouts->channel_layouts[best_idx]); } |