[FFmpeg-devel] [PATCH 3/3] Fix various uninitialized variable warnings
michaelni at gmx.at
Tue May 31 22:37:47 CEST 2011
On Tue, May 31, 2011 at 09:48:59PM +0200, Clément Bœsch wrote:
> On Mon, May 30, 2011 at 12:51:40AM +0200, Michael Niedermayer wrote:
> > On Mon, May 30, 2011 at 12:33:54AM +0200, Clément Bœsch wrote:
> > > On Mon, May 30, 2011 at 12:20:19AM +0200, Michael Niedermayer wrote:
> > > > On Sun, May 29, 2011 at 09:07:36PM +0200, Clément Bœsch wrote:
> > > > > ---
> > > > > ffplay.c | 2 +-
> > > > > libavformat/iff.c | 2 +-
> > > > > libavformat/matroskadec.c | 3 ++-
> > > > > 3 files changed, 4 insertions(+), 3 deletions(-)
> > > >
> > > > are all these warnings false positives?
> > > > if so there should be comments explaining that the =0 is just to
> > > > silence a warning and not strictly needed.
> > > > This makes code easier to understand.
> > >
> > > For the ffplay.c it's hard to say, I'm not familiar with the code enough.
> > i think the cmp code shouldnt be run if there is no output
> > also -1 and AV_NOPTS_VALUE are better defaults than 0
> OK, changed.
> > >
> > > In iff, I'd say no if the codec_type is not audio or video (I guess it can
> > > happen).
> > i dont think it can be anything else, the header reading should fail
> > maybe an assert() could be added to check this
> What about av_abort()? It doesn't seem to be used much but av_assert*
> would be overkill for such a thing IMO. Also, av_assert0 must be used (or
> else it would warn in some cases) and so add a pointless check. What do
> you prefer? (av_abort version attached).
iam fine with whatever you prefer, do you want me to commit/push or
do you want to send me your ssh key, i think you didnt yet ?
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel