[FFmpeg-devel] [PATCH] vf_deshake: set cur_buf to NULL.

Michael Niedermayer michaelni at gmx.at
Mon Jul 23 22:23:01 CEST 2012


On Mon, Jul 23, 2012 at 10:21:33PM +0200, Nicolas George wrote:
> Fix a segfault.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/vf_deshake.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
> index 0a1d865..d03671c 100644
> --- a/libavfilter/vf_deshake.c
> +++ b/libavfilter/vf_deshake.c
> @@ -435,6 +435,7 @@ static int end_frame(AVFilterLink *link)
>      float alpha = 2.0 / deshake->refcount;
>      char tmp[256];
>  
> +    link->cur_buf = NULL; /* it is in 'in' now */

LGTM

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

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/20120723/5b64b621/attachment.asc>


More information about the ffmpeg-devel mailing list