[FFmpeg-devel] [PATCH] libavformat/mpegts.c minor crash and warning avoidance
Benoit Fouet
benoit.fouet
Tue May 22 10:51:43 CEST 2007
Hi,
Baptiste Coudurier wrote:
> Hi
>
> Benoit Fouet wrote:
>
>> [...]
>>
>>
>>> Index: libavformat/mpegts.c
>>> ===================================================================
>>> --- libavformat/mpegts.c (revision 19)
>>> +++ libavformat/mpegts.c (working copy)
>>> @@ -397,7 +397,7 @@
>>> int program_info_length, pcr_pid, pid, stream_type;
>>> int desc_list_len, desc_len, desc_tag;
>>> int comp_page = 0, anc_page = 0; /* initialize to kill warnings */
>>> - char language[4];
>>> + char language[4] = {0}; /* initialize to kill warnings */
>>>
>>>
>>>
>> there is no warning due to the uninitialization of language (maybe your
>> gcc version is too old ?)
>>
>
> I think he refers to:
>
> mpegts.c: In function 'pmt_cb':
> mpegts.c:400: warning: 'language[1]' may be used uninitialized in this
> function
> mpegts.c:400: warning: 'language[2]' may be used uninitialized in this
> function
> mpegts.c:400: warning: 'language[3]' may be used uninitialized in this
> function
>
yes, surely, but:
1/ i have no warning about that
2/ by reading the code quickly, i'd say the warnings are wrong, as
language[0..3] are all initialized if they're read back.
Ben
--
Purple Labs S.A.
www.purplelabs.com
More information about the ffmpeg-devel
mailing list