[FFmpeg-devel] [PATCH] ansi: Fix use of uninitalized width/height warning.

Michael Niedermayer michaelni at gmx.at
Sat Feb 11 08:25:16 CET 2012


On Mon, Feb 06, 2012 at 03:35:28AM +0000, Paul B Mahol wrote:
> On 2/6/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Mon, Feb 06, 2012 at 01:49:42AM +0000, Paul B Mahol wrote:
> >> On 2/6/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> >> > ---
> >> >  libavcodec/ansi.c |    2 ++
> >> >  1 files changed, 2 insertions(+), 0 deletions(-)
> >> >
> >> > diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
> >> > index ebcc288..1128d6f 100644
> >> > --- a/libavcodec/ansi.c
> >> > +++ b/libavcodec/ansi.c
> >> > @@ -182,6 +182,8 @@ static int execute_code(AVCodecContext * avctx, int
> >> > c)
> >> >      case 'l': //reset screen mode
> >> >          if (s->nb_args < 2)
> >> >              s->args[0] = DEFAULT_SCREEN_MODE;
> >> > +        width = avctx->width;
> >> > +        height = avctx->height;
> >> >          switch(s->args[0]) {
> >> >          case 0: case 1: case 4: case 5: case 13: case 19: //320x200 (25
> >> > rows)
> >> >              s->font = ff_cga_font;
> >>
> >> I think that correct fix is to abort in case of unsupported screen mode.
> >
> > maybe but that still doesnt initialize it for
> > "case 7: //set line wrapping"
> >
> 
> Right. Feel free to commit w/o abort.

applied

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120211/334aa12c/attachment.asc>


More information about the ffmpeg-devel mailing list