[FFmpeg-devel] [PATCH 1/3] doc/examples: Add fffuzz example

Michael Niedermayer michael at niedermayer.cc
Thu Apr 14 16:00:58 CEST 2016


On Mon, Apr 11, 2016 at 11:21:55PM +0200, Pawel Golinski wrote:
> There are some afl specific macros inside,
> to make the example usable with afl fuzzer.
> ---
>  doc/examples/fffuzz.c | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 373 insertions(+)
>  create mode 100644 doc/examples/fffuzz.c

If this is intended as a test it should go into tests not doc/examples

also missing hookup to the build system


> 
> diff --git a/doc/examples/fffuzz.c b/doc/examples/fffuzz.c
> new file mode 100644
> index 0000000..e59066d
> --- /dev/null
> +++ b/doc/examples/fffuzz.c
> @@ -0,0 +1,373 @@
> +/*
> + * Copyright (c) 2012 Stefano Sabatini
> + * Copyright (c) 2015 Andreas Cadhalpun

<kierank> the first patch in the patchset is my patch so I can't review it

would suggest to me that he should be listed in the Copyright too


[...]

> +        ret = 0;
> +        /* decode video frame */
> +        ret = avcodec_decode_video2(dec_ctx, frame, got_frame, pkt);

[...]

> +    } else if (dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
> +        ret = 0;
> +        /* decode audio frame */
> +        ret = avcodec_decode_audio4(dec_ctx, frame, got_frame, pkt);

[...]

> +    } else if (dec_ctx->codec_type == AVMEDIA_TYPE_SUBTITLE) {
> +        ret = 0;
> +        /* decode video frame */
> +        ret = avcodec_decode_subtitle2(dec_ctx, &sub, got_frame, pkt);

writing twice to ret makes no sense, not in any programming language
i know


[...]

-- 
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: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160414/3b357e83/attachment.sig>


More information about the ffmpeg-devel mailing list