Re: [libav-devel] [PATCH] avresample: check output FIFO validity before usage

2018-01-28 Thread Sean McGovern
On Sun, Jan 21, 2018 at 1:15 AM, Luca Barbato  wrote:
> On 20/01/2018 16:21, Sean McGovern wrote:
>>
>> Is this patch still useful for library users? Can I apply it without the
>> Bug-Id?
>
>
> I think we have to decide if it is an invalid usage of the API (and be even
> louder with the error message) or if it is acceptable and we should just
> return 0.
>
> I think Vittorio might have a more informed opinion since he is currently
> working on the audio layer :)

Ping!

>
>
> lu
> ___
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] avresample: check output FIFO validity before usage

2018-01-20 Thread Luca Barbato

On 20/01/2018 16:21, Sean McGovern wrote:

Is this patch still useful for library users? Can I apply it without the
Bug-Id?


I think we have to decide if it is an invalid usage of the API (and be 
even louder with the error message) or if it is acceptable and we should 
just return 0.


I think Vittorio might have a more informed opinion since he is 
currently working on the audio layer :)


lu
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] avresample: check output FIFO validity before usage

2018-01-20 Thread Sean McGovern
Hi,

On Jan 20, 2018 06:56, "Luca Barbato"  wrote:

On 20/01/2018 11:10, Luca Barbato wrote:

> On 17/01/2018 23:36, Sean McGovern wrote:
>
>> Bug-Id: 1089
>> Cc: libav-sta...@libav.org
>> ---
>>   libavresample/utils.c | 5 +
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/libavresample/utils.c b/libavresample/utils.c
>> index bab2153..3d959c5 100644
>> --- a/libavresample/utils.c
>> +++ b/libavresample/utils.c
>> @@ -754,6 +754,11 @@ int avresample_get_out_samples(AVAudioResampleContext
>> *avr, int in_nb_samples)
>>   {
>>   int64_t samples = avresample_get_delay(avr) +
>> (int64_t)in_nb_samples;
>> +if (!avr->out_fifo) {
>> +av_log(avr, AV_LOG_ERROR, "Output FIFO is invalid\n");
>> +return AVERROR(EINVAL);
>> +}
>> +
>>   if (avr->resample_needed) {
>>   samples = av_rescale_rnd(samples,
>>avr->out_sample_rate,
>>
>>
> Probably it is safe to add that check, but I wonder why it happens...
>
>
The problem is in avconv.c actually.

27085d1b47c3741cc0fac284c916127c4066d049 solves it.


lu



___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel



Thanks for backporting that.

Is this patch still useful for library users? Can I apply it without the
Bug-Id?

-- Sean McG.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] avresample: check output FIFO validity before usage

2018-01-20 Thread Luca Barbato

On 20/01/2018 11:10, Luca Barbato wrote:

On 17/01/2018 23:36, Sean McGovern wrote:

Bug-Id: 1089
Cc: libav-sta...@libav.org
---
  libavresample/utils.c | 5 +
  1 file changed, 5 insertions(+)

diff --git a/libavresample/utils.c b/libavresample/utils.c
index bab2153..3d959c5 100644
--- a/libavresample/utils.c
+++ b/libavresample/utils.c
@@ -754,6 +754,11 @@ int 
avresample_get_out_samples(AVAudioResampleContext *avr, int 
in_nb_samples)

  {
  int64_t samples = avresample_get_delay(avr) + 
(int64_t)in_nb_samples;

+    if (!avr->out_fifo) {
+    av_log(avr, AV_LOG_ERROR, "Output FIFO is invalid\n");
+    return AVERROR(EINVAL);
+    }
+
  if (avr->resample_needed) {
  samples = av_rescale_rnd(samples,
   avr->out_sample_rate,



Probably it is safe to add that check, but I wonder why it happens...



The problem is in avconv.c actually.

27085d1b47c3741cc0fac284c916127c4066d049 solves it.

lu



___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] avresample: check output FIFO validity before usage

2018-01-20 Thread Luca Barbato

On 17/01/2018 23:36, Sean McGovern wrote:

Bug-Id: 1089
Cc: libav-sta...@libav.org
---
  libavresample/utils.c | 5 +
  1 file changed, 5 insertions(+)

diff --git a/libavresample/utils.c b/libavresample/utils.c
index bab2153..3d959c5 100644
--- a/libavresample/utils.c
+++ b/libavresample/utils.c
@@ -754,6 +754,11 @@ int avresample_get_out_samples(AVAudioResampleContext 
*avr, int in_nb_samples)
  {
  int64_t samples = avresample_get_delay(avr) + (int64_t)in_nb_samples;
  
+if (!avr->out_fifo) {

+av_log(avr, AV_LOG_ERROR, "Output FIFO is invalid\n");
+return AVERROR(EINVAL);
+}
+
  if (avr->resample_needed) {
  samples = av_rescale_rnd(samples,
   avr->out_sample_rate,



Probably it is safe to add that check, but I wonder why it happens...

lu
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel