Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Paul B Mahol
On 3/8/15, Nicolas George geo...@nsup.org wrote:
 L'octidi 18 ventose, an CCXXIII, Paul B Mahol a ecrit :
 Yes, it gives me floating exception. Looks like uninit() is called
 unconditionally.

 Of course uninit() is called unconditionally. But it should not crash, and
 I
 re-checked here and it does not crash indeed.

 This change seems very wrong to me, you have the very same divide-by-zero
 in
 the per-channel case, just above your test, there is no reason for one to
 crash and not the other.

You mean for case when there are channels present but without any
samples? For example nb_channels = 2 and nb_samples = 0?

 Regards,

 --
   Nicolas George

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Nicolas George
L'octidi 18 ventôse, an CCXXIII, Paul B Mahol a écrit :
 Well, nb_channels is for certain 0 here.

Well, I am not here and I would like to see, because I am responsible for
the code path that leads there.

So please give enough information to reproduce the bug. You already stated
it was with clang, please give at least the exact command line you used and
if necessary the input sample.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Nicolas George
L'octidi 18 ventôse, an CCXXIII, Martin Vignali a écrit :
 +if (!nb_samples || !s-nb_channels)

Half your test is completely useless, as s-nb_channels can not be zero.

Did you manage tu reproduce the issue it is supposed to fix?

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Nicolas George
L'octidi 18 ventôse, an CCXXIII, Paul B Mahol a écrit :
 Yes, it gives me floating exception. Looks like uninit() is called
 unconditionally.

Of course uninit() is called unconditionally. But it should not crash, and I
re-checked here and it does not crash indeed.

This change seems very wrong to me, you have the very same divide-by-zero in
the per-channel case, just above your test, there is no reason for one to
crash and not the other.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Paul B Mahol
On 3/8/15, Nicolas George geo...@nsup.org wrote:
 L'octidi 18 ventose, an CCXXIII, Paul B Mahol a ecrit :
 You mean for case when there are channels present but without any
 samples? For example nb_channels = 2 and nb_samples = 0?

 Yes. Are you suggesting that when you reproduce the crash, it happens with
 nb_channels == 0? If so, I would very much like to see that, because it
 should not be possible at all.

With nb_channels = 0 and nb_samples = 0 and compiled with clang i get
floating exception.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Nicolas George
L'octidi 18 ventôse, an CCXXIII, Paul B Mahol a écrit :
 With nb_channels = 0 and nb_samples = 0 and compiled with clang i get
 floating exception.

nb_channels is not possible. If you reach it, please investigate, or at
least give some details to allow people to investigate.

Hiding bugs is never a good idea.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Martin Vignali
In attach a sample file

I use this line to create the crash :
ffmpag -i path_to_file_in_attach -filter astats -f null -

2015-03-08 11:05 GMT+01:00 Nicolas George geo...@nsup.org:

 L'octidi 18 ventôse, an CCXXIII, Paul B Mahol a écrit :
  Well, nb_channels is for certain 0 here.

 Well, I am not here and I would like to see, because I am responsible for
 the code path that leads there.

 So please give enough information to reproduce the bug. You already stated
 it was with clang, please give at least the exact command line you used and
 if necessary the input sample.

 Regards,

 --
   Nicolas George

 ___
 ffmpeg-devel mailing list
 ffmpeg-devel@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-devel




movSsSon.mov
Description: QuickTime movie
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Paul B Mahol
On 3/8/15, Martin Vignali martin.vign...@gmail.com wrote:
 In attach a sample file

 I use this line to create the crash :
 ffmpag -i path_to_file_in_attach -filter astats -f null -

I used this same command and sample provided by Martin.


 2015-03-08 11:05 GMT+01:00 Nicolas George geo...@nsup.org:

 L'octidi 18 ventose, an CCXXIII, Paul B Mahol a ecrit :
  Well, nb_channels is for certain 0 here.

 Well, I am not here and I would like to see, because I am responsible
 for
 the code path that leads there.

 So please give enough information to reproduce the bug. You already
 stated
 it was with clang, please give at least the exact command line you used
 and
 if necessary the input sample.

 Regards,

 --
   Nicolas George

 ___
 ffmpeg-devel mailing list
 ffmpeg-devel@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Paul B Mahol
On 3/8/15, Nicolas George geo...@nsup.org wrote:
 L'octidi 18 ventose, an CCXXIII, Martin Vignali a ecrit :
 +if (!nb_samples || !s-nb_channels)

 Half your test is completely useless, as s-nb_channels can not be zero.

 Did you manage tu reproduce the issue it is supposed to fix?

Yes, it gives me floating exception. Looks like uninit() is called
unconditionally.

 Regards,

 --
   Nicolas George

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Nicolas George
L'octidi 18 ventôse, an CCXXIII, Paul B Mahol a écrit :
 You mean for case when there are channels present but without any
 samples? For example nb_channels = 2 and nb_samples = 0?

Yes. Are you suggesting that when you reproduce the crash, it happens with
nb_channels == 0? If so, I would very much like to see that, because it
should not be possible at all.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avfilter/af_astats: Avoid Zero division in print part.

2015-03-08 Thread Paul B Mahol
On 3/8/15, Nicolas George geo...@nsup.org wrote:
 L'octidi 18 ventose, an CCXXIII, Paul B Mahol a ecrit :
 With nb_channels = 0 and nb_samples = 0 and compiled with clang i get
 floating exception.

 nb_channels is not possible. If you reach it, please investigate, or at
 least give some details to allow people to investigate.

Well, nb_channels is for certain 0 here.

 Hiding bugs is never a good idea.

 Regards,

 --
   Nicolas George

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel