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

Burt P pburt0 at gmail.com
Sun Aug 7 18:50:11 EEST 2016


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..36da409 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>"
-- 
2.7.4



More information about the ffmpeg-devel mailing list