[Ffmpeg-devel] [PATCH] fix use of uninitialized variables in truemotion1.c

Diego Biurrun diego
Mon Jan 29 11:26:14 CET 2007


On Mon, Jan 29, 2007 at 11:16:35AM +0100, Sascha Sommer wrote:
> 
> Attached patch fixes the use of uninitialized variables in truemotion1.c
> 
> Sprite frames seem to be unsupported. Therefore I modified the code to return 
> an error code when a sprite frame is found.
> 
> If noone objects within a week, I'm going to commit it.
> 
> --- libavcodec/truemotion1.c	(revision 7754)
> +++ libavcodec/truemotion1.c	(working copy)
> @@ -374,10 +374,14 @@
>  
>      if (s->flags & FLAG_SPRITE) {
>          av_log(s->avctx, AV_LOG_INFO, "SPRITE frame found, please report the sample to the developers\n");
> +#if 0
>          s->w = header.width;
>          s->h = header.height;
>          s->x = header.xoffset;
>          s->y = header.yoffset;
> +#else
> +        return -1;
> +#endif

Please add a comment to the '#if 0', I hate '#if 0' statements in the
code for no apparent reason.

Diego





More information about the ffmpeg-devel mailing list