[FFmpeg-devel] Patch proposal : Fix crash with astats filter when no audio input
george at nsup.org
Sun Mar 8 11:18:56 CET 2015
L'octidi 18 ventôse, an CCXXIII, Martin Vignali a écrit :
> In attach a sample file, who make a crash. (on mac os x with latest git
> version, and on windows with older version).
> i just make the test now, and s->nb_channels can be 0. (this is the case
> with the file in attach).
Ok, got it.
The problem happens when the filter is inited but something fails during
configuration. For example when using it with a video stream.
In that case, I believe Paul's fix is wrong, because no attempt at printing
stats should be done at all in that case. "s->channels" can indeed serve to
test if the configuration succeeded, but it must happen earlier, probably
something like that:
Furthermore, the global stats should be printed for an empty stream,
otherwise it will break scripts.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: Digital signature
More information about the ffmpeg-devel