[FFmpeg-devel] [PATCH] av_get_cpu_flags(): initialize static variable

Måns Rullgård mans
Fri Sep 10 23:33:44 CEST 2010


Alex Converse <alex.converse at gmail.com> writes:

> On Fri, Sep 10, 2010 at 4:56 PM, Rafa?l Carr? <rafael.carre at gmail.com> wrote:
>> ---
>> ?libavutil/cpu.c | ? ?2 +-
>> ?1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavutil/cpu.c b/libavutil/cpu.c
>> index 1548530..2ca81fd 100644
>> --- a/libavutil/cpu.c
>> +++ b/libavutil/cpu.c
>> @@ -21,7 +21,7 @@
>>
>> ?int av_get_cpu_flags(void)
>> ?{
>> - ? ?static int flags, checked;
>> + ? ?static int flags, checked = 0;
>>
>> ? ? if (checked)
>> ? ? ? ? return flags;
>
> This seems unnecessary.

Correct.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list