diff mbox

[FFmpeg-devel] lswr/swresample: Mention actually supported formats when erroring out

Message ID CAB0OVGpnOZ88zsAwRMXASrNkVU1Qe5u4GnqDukHj9+cwuKYtKQ@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Oct. 26, 2017, 3:03 p.m. UTC
Hi!

Attached patch is supposed to fix ticket #6779.

Please comment, Carl Eugen

Comments

Derek Buitenhuis Oct. 26, 2017, 4:10 p.m. UTC | #1
On 10/26/2017 4:03 PM, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch is supposed to fix ticket #6779.
> 
> Please comment, Carl Eugen

Is the 'p' suffix on each needed, since swr only supports 'planar' audio?

- Derek
Carl Eugen Hoyos Oct. 26, 2017, 4:13 p.m. UTC | #2
2017-10-26 18:10 GMT+02:00 Derek Buitenhuis <derek.buitenhuis@gmail.com>:
> On 10/26/2017 4:03 PM, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch is supposed to fix ticket #6779.
>>
>> Please comment, Carl Eugen
>
> Is the 'p' suffix on each needed, since swr only supports 'planar' audio?

Not sure I understand:
Do you mean that the filter option should not require "p" but add
it always?

Or do you mean it is obvious for users that only planar
formats are supported?

Carl Eugen
Derek Buitenhuis Oct. 26, 2017, 4:16 p.m. UTC | #3
On 10/26/2017 5:13 PM, Carl Eugen Hoyos wrote:
> Not sure I understand:
> Do you mean that the filter option should not require "p" but add
> it always?
> 
> Or do you mean it is obvious for users that only planar
> formats are supported?

If it lines up with the option names, then yes, leave the 'p'.

From the API users' perspective, it's redundant, though, IMO.

I have no strong feelings on it, just wanted to ask.

- Derek
Carl Eugen Hoyos Oct. 26, 2017, 4:17 p.m. UTC | #4
2017-10-26 18:16 GMT+02:00 Derek Buitenhuis <derek.buitenhuis@gmail.com>:
> On 10/26/2017 5:13 PM, Carl Eugen Hoyos wrote:
>> Not sure I understand:
>> Do you mean that the filter option should not require "p" but add
>> it always?
>>
>> Or do you mean it is obvious for users that only planar
>> formats are supported?
>
> If it lines up with the option names, then yes, leave the 'p'.

It does line up with the option names afaik.

Carl Eugen
Michael Niedermayer Oct. 27, 2017, 2:12 a.m. UTC | #5
On Thu, Oct 26, 2017 at 05:03:37PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch is supposed to fix ticket #6779.
> 
> Please comment, Carl Eugen

>  swresample.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> d66bcf39e9ce53dad4db82a5202c7494fbf2d46c  0001-lswr-swresample-Mention-the-actually-supported-forma.patch
> From 17ffc43ba32c83e0e1d26df06b7f4445adb1206b Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
> Date: Thu, 26 Oct 2017 16:52:22 +0200
> Subject: [PATCH] lswr/swresample: Mention the actually supported formats when
>  erroring out.
> 
> Fixes ticket #6779.
> ---
>  libswresample/swresample.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

probably ok

[...]
Carl Eugen Hoyos Oct. 28, 2017, 7:22 p.m. UTC | #6
2017-10-27 4:12 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:
> On Thu, Oct 26, 2017 at 05:03:37PM +0200, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch is supposed to fix ticket #6779.
>>
>> Please comment, Carl Eugen
>
>>  swresample.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> d66bcf39e9ce53dad4db82a5202c7494fbf2d46c  0001-lswr-swresample-Mention-the-actually-supported-forma.patch
>> From 17ffc43ba32c83e0e1d26df06b7f4445adb1206b Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>> Date: Thu, 26 Oct 2017 16:52:22 +0200
>> Subject: [PATCH] lswr/swresample: Mention the actually supported formats when
>>  erroring out.
>>
>> Fixes ticket #6779.
>> ---
>>  libswresample/swresample.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> probably ok

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

From 17ffc43ba32c83e0e1d26df06b7f4445adb1206b Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Thu, 26 Oct 2017 16:52:22 +0200
Subject: [PATCH] lswr/swresample: Mention the actually supported formats when
 erroring out.

Fixes ticket #6779.
---
 libswresample/swresample.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 74c96dc..f076b6c 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -240,7 +240,7 @@  av_cold int swr_init(struct SwrContext *s){
         &&s->int_sample_fmt != AV_SAMPLE_FMT_S64P
         &&s->int_sample_fmt != AV_SAMPLE_FMT_FLTP
         &&s->int_sample_fmt != AV_SAMPLE_FMT_DBLP){
-        av_log(s, AV_LOG_ERROR, "Requested sample format %s is not supported internally, S16/S32/S64/FLT/DBL is supported\n", av_get_sample_fmt_name(s->int_sample_fmt));
+        av_log(s, AV_LOG_ERROR, "Requested sample format %s is not supported internally, s16p/s32p/s64p/fltp/dblp are supported\n", av_get_sample_fmt_name(s->int_sample_fmt));
         return AVERROR(EINVAL);
     }
 
@@ -276,7 +276,7 @@  av_cold int swr_init(struct SwrContext *s){
         && s->int_sample_fmt != AV_SAMPLE_FMT_FLTP
         && s->int_sample_fmt != AV_SAMPLE_FMT_DBLP
         && s->resample){
-        av_log(s, AV_LOG_ERROR, "Resampling only supported with internal s16/s32/flt/dbl\n");
+        av_log(s, AV_LOG_ERROR, "Resampling only supported with internal s16p/s32p/fltp/dblp\n");
         ret = AVERROR(EINVAL);
         goto fail;
     }
-- 
1.7.10.4