Support filters and decoders that dont support negative linesizes.

This patch is based on work by stefano.

Originally committed as revision 26108 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2010-12-27 15:10:21 +00:00
parent 9e99f84f7d
commit 0ccabeeaef
4 changed files with 15 additions and 6 deletions

View File

@@ -1616,6 +1616,9 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
int i, w, h, stride[4];
unsigned edge;
if (codec->codec->capabilities & CODEC_CAP_NEG_LINESIZES)
perms |= AV_PERM_NEG_LINESIZES;
if(pic->buffer_hints & FF_BUFFER_HINTS_VALID) {
if(pic->buffer_hints & FF_BUFFER_HINTS_READABLE) perms |= AV_PERM_READ;
if(pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE) perms |= AV_PERM_PRESERVE;