[FFmpeg-devel] [PATCH 2/3] lavc: add a framework to fix alignment problems.

Michael Niedermayer michael at niedermayer.cc
Wed May 10 05:26:10 EEST 2017


On Wed, May 10, 2017 at 04:16:25AM +0200, Michael Niedermayer wrote:
> On Tue, May 09, 2017 at 03:19:43PM +0200, Nicolas George wrote:
> > A lot of codecs require aligned frame data, but do not document it.
> > It can result in crashes with perfectly valid uses of the API.
> > 
> > Design rationale:
> > 
> > - requiring frame data to be always aligned would be wasteful;
> > 
> > - alignment requirements will evolve
> >   (the 16->32 bump is still recent);
> > 
> > - requiring applications to worry about alignment is not convenient.
> > 
> > For now, the default alignment is fixed at 5.
> > 
> > Fix: trac ticket #6349
> > Signed-off-by: Nicolas George <george at nsup.org>
> > ---
> >  libavcodec/avcodec.h | 10 +++++++++
> >  libavcodec/encode.c  | 57 +++++++++++++++++++++++++++++++++++++++++++++++++---
> >  libavcodec/utils.c   |  2 ++
> >  3 files changed, 66 insertions(+), 3 deletions(-)
> 
> breaks (green stuff on edges)
>  ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -an -vframes 5  -vf uspp=4:8 -qscale 1 -y file.avi

note ive also seen s segfault on the side with this patchset when
bisecting but i failed to reproduce, so might be unrelated
if i see it again and succeed to get a backtace ill post it

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170510/c87b2c98/attachment.sig>


More information about the ffmpeg-devel mailing list