On Mon, Sep 16, 2013 at 02:42:11PM -0400, Andrew Kelley wrote:
> --- /dev/null
> +++ b/libavfilter/api-example.c
> @@ -0,0 +1,321 @@
> +
> +#include <libavformat/avformat.h>
> +#include <libavfilter/avfilter.h>
> +#include <libavfilter/buffersink.h>
> +#include <libavfilter/buffersrc.h>
> +#include <libavutil/samplefmt.h>
> +#include <libavutil/opt.h>
> +#include <libavutil/channel_layout.h>
> +
> +#include <ao/ao.h>

This program has a dependency on libao, which is unfortunate, as then
not everybody will be able to compile the program.  It will also not
be built on all our FATE test instances.

> +static int init_filter_graph(AVFormatContext *ic, AVStream *audio_st)
> +{
> +    // create new graph
> +    filter_graph = avfilter_graph_alloc();
> +    if (!filter_graph) {
> +        av_log(NULL, AV_LOG_ERROR, "unable to create filter graph: out of 
> memory\n");
> +        return -1;
> +    }
> +
> +    AVFilter *abuffer = avfilter_get_by_name("abuffer");
> +    AVFilter *volume = avfilter_get_by_name("volume");
> +    AVFilter *aformat = avfilter_get_by_name("aformat");
> +    AVFilter *abuffersink = avfilter_get_by_name("abuffersink");

We don't allow C99 mixed declarations and statements.


The example also has a bunch of style issues and lacks integration into
our build system.  Grab the patches I just sent as a reply to your patch
and apply them to your tree locally.  You will see that "make examples"
fails because of the mixed declarations and statements.

If you really need to keep the external dependency, it would have to be
checked for in configure.  I suggest dropping it and have the example
program do something w/o external dependency.

Anton, anything else?

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to