diff mbox

[FFmpeg-devel,3/5] af_hdcd: add mono as a supported channel layout

Message ID 1475394393-10173-4-git-send-email-pburt0@gmail.com
State Accepted
Commit de9b23ac1f9d5471458d11954fc12b9ea73502d3
Headers show

Commit Message

Burt P Oct. 2, 2016, 7:46 a.m. UTC
Signed-off-by: Burt P <pburt0@gmail.com>
---
 libavfilter/af_hdcd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Burt P Oct. 5, 2016, 6:03 p.m. UTC | #1
applied

--
Burt

On Sun, Oct 2, 2016 at 2:46 AM, Burt P <pburt0@gmail.com> wrote:
> Signed-off-by: Burt P <pburt0@gmail.com>
> ---
>  libavfilter/af_hdcd.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
> index 90b6b64..6f35c09 100644
> --- a/libavfilter/af_hdcd.c
> +++ b/libavfilter/af_hdcd.c
> @@ -1724,6 +1724,9 @@ static int query_formats(AVFilterContext *ctx)
>      };
>      int ret;
>
> +    ret = ff_add_channel_layout(&layouts, AV_CH_LAYOUT_MONO);
> +    if (ret < 0)
> +        return ret;
>      ret = ff_add_channel_layout(&layouts, AV_CH_LAYOUT_STEREO);
>      if (ret < 0)
>          return ret;
> @@ -1822,7 +1825,7 @@ static int config_input(AVFilterLink *inlink) {
>          s->cdt_ms, s->state[0].sustain_reset );
>
>      if (inlink->channels != 2 && s->process_stereo) {
> -        av_log(ctx, AV_LOG_WARNING, "process_stereo disabled (channels = %d)", inlink->channels);
> +        av_log(ctx, AV_LOG_WARNING, "process_stereo disabled (channels = %d)\n", inlink->channels);
>          s->process_stereo = 0;
>      }
>      av_log(ctx, AV_LOG_VERBOSE, "Process mode: %s\n",
> --
> 2.7.4
>
diff mbox

Patch

diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index 90b6b64..6f35c09 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -1724,6 +1724,9 @@  static int query_formats(AVFilterContext *ctx)
     };
     int ret;
 
+    ret = ff_add_channel_layout(&layouts, AV_CH_LAYOUT_MONO);
+    if (ret < 0)
+        return ret;
     ret = ff_add_channel_layout(&layouts, AV_CH_LAYOUT_STEREO);
     if (ret < 0)
         return ret;
@@ -1822,7 +1825,7 @@  static int config_input(AVFilterLink *inlink) {
         s->cdt_ms, s->state[0].sustain_reset );
 
     if (inlink->channels != 2 && s->process_stereo) {
-        av_log(ctx, AV_LOG_WARNING, "process_stereo disabled (channels = %d)", inlink->channels);
+        av_log(ctx, AV_LOG_WARNING, "process_stereo disabled (channels = %d)\n", inlink->channels);
         s->process_stereo = 0;
     }
     av_log(ctx, AV_LOG_VERBOSE, "Process mode: %s\n",