[FFmpeg-devel] [PATCH] ffmpeg.c: Initializing uninitialized variables
michaelni at gmx.at
Thu Sep 1 16:36:38 CEST 2011
On Thu, Sep 01, 2011 at 02:02:21PM +0000, Chiranjeevi Melam wrote:
> Most of these variables are set in static void do_audio_out(AVFormatContext *s,
> If ffmpeg_exit() is called prior to calling do_audio_out, then it might try to do a free on an uninitialized variable. So the Changes we made fixed the issue.
ISO C 6.7.8 Initialization
10 If an object that has automatic storage duration is not initialized explicitly, its value is
indeterminate. If an object that has static storage duration is not initialized explicitly,
-- if it has pointer type, it is initialized to a null pointer;
-- if it has arithmetic type, it is initialized to (positive or unsigned) zero;
-- if it is an aggregate, every member is initialized (recursively) according to these rules;
-- if it is a union, the first named member is initialized (recursively) according to these
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Old school: Use the lowest level language in which you can solve the problem
New school: Use the highest level language in which the latest supercomputer
can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel