[FFmpeg-devel] [PATCH] avcodec/libmp3lame: properly handle unaligned frame data

Nicolas George george at nsup.org
Tue May 2 17:16:35 EEST 2017


Le duodi 12 floréal, an CCXXV, Paul B Mahol a écrit :
> This is all one big mess.

It is, but I will not take responsibility when it is not mine.

Libavfilter was in need of a serious overhaul. I do not see you denying
it, and you suffered from the limitations it was causing as much as
anybody else. I have undertaken that overhaul, and the help I received
from other developers in that project has been scarce, to say the least.

I do not complain, I can manage on my own; it will take longer, but I am
in no rush. But I will not let the complaints of the inspectors of
finished work trouble me.

An overhaul of this magnitude is sure to introduce bugs. This one did,
and I made a point of fixing them. My work tree is currently set up to
investigate the problem with shortest and dualinput. Once again, feel
free to offer help.

An overhaul of this magnitude is also sure to reveal bugs that were
already present in the code base and just did not manifest due to
undocumented specifics of the old implementation.

The crash we are discussing is caused by the new code violating the
unwritten un-agreed-upon rule that it must keep the data extra-aligned.
Except there is no such thing as an "unwritten un-agreed-upon rule". The
cause of the crash is the code in libmp3lame relying on this unwritten
un-agreed-upon rule. I strongly suspect it can be triggered by an
application without using libavfilter at all.

For now, fixing libmp3lame is the correct solution, and this patch does
it. I think it is not the best long-term solution, but that is not for
me to say.

Another solution would be to write the rule. If somebody does, then I
will implement the code needed to respect it in libavfilter.

But I will not raise another finger to write the rule, because whatever
I do I will be blamed, and I am fed up with that attitude.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170502/f4611bff/attachment.sig>


More information about the ffmpeg-devel mailing list