[FFmpeg-soc] [PATCH] Fix bug in vsrc_movie.c

Bobby Bingham uhmmmm at gmail.com
Thu Apr 1 08:05:52 CEST 2010


On Wed, 31 Mar 2010 20:56:41 -0400
Brandon Mintern <bmintern at gmail.com> wrote:

> I e-mailed this to the list before, but I think it may have been
> overlooked because I didn't prepend my post with "[PATCH]". When
> looking at init() in vsrc_movie.c, I noticed that there was an
> improperly-indented else statement, and looking at the code there
> appears to be a bug in the error-handling logic. Presumably, when
> "movie" is called with no args, it will fail without reporting an
> error. The patch to fix this issue is below.
> 
> - Brandon
> 
> Index: vsrc_movie.c
> ===================================================================
> --- vsrc_movie.c	(revision 5726)
> +++ vsrc_movie.c	(working copy)
> @@ -140,9 +140,8 @@
>              // sanity check parms
>              if (mv->seek_point >= 0 && *mv->file_name)
>                  return movie_init(ctx);
> -        }
> -        else
> -            av_log(ctx, AV_LOG_ERROR, "init() expected 3
> arguments:'%s'\n", args);
> +    }
> +    av_log(ctx, AV_LOG_ERROR, "init() expected 3 arguments:'%s'\n", args);
>      return -1;
>  }

Please attach your patches instead of pasting them inline.  Your mailer
has mangled the lines.  Also, we require that you separate cosmetic
changes (changing the indentation on the av_log and "}") and functional
changes (removing the else) into separate patches.  It makes it easier
to see what's really changed.

The fix itself looks fine.  Split it up and I'll apply it.
-- 
Bobby Bingham
このメールは再利用されたバイトでできている。


More information about the FFmpeg-soc mailing list