Hi,

On Thu, Aug 25, 2016 at 8:56 AM, Diego Biurrun <di...@biurrun.de> wrote:
> On Wed, Aug 24, 2016 at 07:34:22AM -0500, Burt P wrote:
>
> This probably deserves a mention in doc/general.texi and a version bump
> for libavfilter.
>

Done.

>> --- a/doc/filters.texi
>> +++ b/doc/filters.texi
>> @@ -647,6 +647,53 @@ avconv -i fl -i fr -i fc -i sl -i sr -i lfe 
>> -filter_complex
>> +
>> +When using the filter with wav, note the default encoding for wav is 16-bit,
>
> .. with WAV, note that the default encoding for WAV is 16-bit,

Done.

>> --- a/libavfilter/Makefile
>> +++ b/libavfilter/Makefile
>> @@ -37,6 +37,7 @@ OBJS-$(CONFIG_COMPAND_FILTER)                += 
>> af_compand.o
>>  OBJS-$(CONFIG_JOIN_FILTER)                   += af_join.o
>>  OBJS-$(CONFIG_RESAMPLE_FILTER)               += af_resample.o
>>  OBJS-$(CONFIG_VOLUME_FILTER)                 += af_volume.o
>> +OBJS-$(CONFIG_HDCD_FILTER)                   += af_hdcd.o
>
> order

Done.

>> --- a/libavfilter/allfilters.c
>> +++ b/libavfilter/allfilters.c
>> @@ -60,6 +60,7 @@ void avfilter_register_all(void)
>>      REGISTER_FILTER(JOIN,           join,           af);
>>      REGISTER_FILTER(RESAMPLE,       resample,       af);
>>      REGISTER_FILTER(VOLUME,         volume,         af);
>> +    REGISTER_FILTER(HDCD,           hdcd,           af);
>
> order

Done.

>> --- /dev/null
>> +++ b/libavfilter/af_hdcd.c
>> @@ -0,0 +1,199 @@
>> +
>> +#include "libavutil/opt.h"
>> +#include "libavutil/avassert.h"
>> +#include "libavutil/channel_layout.h"
>> +#include "formats.h"
>> +#include "avfilter.h"
>> +#include "internal.h"
>> +#include "audio.h"
>> +#include <hdcd/hdcd_simple.h>
>> +#include <hdcd/hdcd_decode2.h> /* only for HDCD_ANA_*_DESC defines */
>
> System headers should be placed before local headers.

Done.

>> +typedef struct HDCDContext {
>> +    const AVClass *class;
>> +
>> +    hdcd_simple_t *shdcd;
>
> The _t namespace is reserved for POSIX, the library should not invade it.

Um, I think it is too late to change it.

>> +static int filter_frame(AVFilterLink *inlink, AVFrame *in)
>> +{
>> +    out = ff_get_audio_buffer(outlink, in->nb_samples);
>> +    if (!out) {
>> +        av_frame_free(&in);
>> +        return AVERROR(ENOMEM);
>> +    }
>> +    result = av_frame_copy_props(out, in);
>> +    if (result) {
>> +        av_frame_free(&in);
>> +        return result;
>> +    }
>
> Where does out get freed if av_frame_copy_props() fails?

Done.

>> +static av_cold void uninit(AVFilterContext *ctx)
>> +{
>> +    shdcd_detect_str(s->shdcd, detect_str, sizeof(detect_str));
>> +    shdcd_free(s->shdcd);
>
> Why does the library use an shdcd instead of an hdcd prefix?

It is the "simple" api of the library. Maybe it should have been
hdcds_ or something,
but it isn't.

>
>> +static void af_hdcd_log(const void *priv, const char* fmt, va_list args)
>
> char *fmt
>

Done.


For indentation and other cosmetic changes, could you submit a patch
after this? I don't feel I will be able to get it spaces-perfect for
you.

Thanks for the comments.
--
Burt
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to