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

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


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are best at talking, realize last or never when they are wrong.
-------------- 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/ecb13de6/attachment.sig>


More information about the ffmpeg-devel mailing list