Skip to content
Snippets Groups Projects
Commit e662b263 authored by Matthew Einhorn's avatar Matthew Einhorn Committed by Michael Niedermayer
Browse files

Fixes avpicture_layout to not write past buffer end.


avpicture_get_size() returns the size of buffer required for avpicture_layout.
For pseudo-paletted formats (gray8...) this size does not include the palette.
However, avpicture_layout doesn't know this and still writes the palette. Consequently,
avpicture_layout writes passed the length of the buffer. This fixes it
by fixing avpicture_layout so that it doesn't write the palette for these formats.

Signed-off-by: default avatarMatthew Einhorn <moiein2000@gmail.com>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent e31c5ebe
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment