[FFmpeg-devel] [PATCHv2] af_hdcd: Don't warn if converting from AV_SAMPLE_FMT_S16P

Nicolas George george at nsup.org
Sun Aug 7 20:20:12 EEST 2016


Le primidi 21 thermidor, an CCXXIV, Burt P a écrit :
> Signed-off-by: Burt P <pburt0 at gmail.com>
> ---
>  libavfilter/af_hdcd.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
> index e4e37e2..ebfe0f1 100644
> --- a/libavfilter/af_hdcd.c
> +++ b/libavfilter/af_hdcd.c
> @@ -1714,7 +1714,9 @@ static int config_input(AVFilterLink *inlink) {
>      AVFilterLink *lk = inlink;
>      while(lk != NULL) {
>          AVFilterContext *nextf = lk->src;
> -        if (lk->format != AV_SAMPLE_FMT_S16 || lk->sample_rate != 44100) {
> +        int sfok = (lk->format == AV_SAMPLE_FMT_S16 ||
> +                    lk->format == AV_SAMPLE_FMT_S16P);
> +        if ( !sfok || lk->sample_rate != 44100) {
>              av_log(ctx, AV_LOG_WARNING, "An input format is %s@%dHz at %s. It will truncated/resampled to s16 at 44100Hz.\n",
>                  av_get_sample_fmt_name(lk->format), lk->sample_rate,
>                  (nextf->name) ? nextf->name : "<unknown>"

Sorry if it has been addressed before, but what are these tests? Why is this
filter invading other filters' privacy?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160807/62cce57c/attachment.sig>


More information about the ffmpeg-devel mailing list