diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-06-30 09:02:14 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-06-30 09:02:14 +0200 |
commit | 3713cf11c62df4d993272843c7ef57a1dca3a386 (patch) | |
tree | 83bba649cad6bb60f9a5737bc1658b635be7ae30 /libavcodec/rawdec.c | |
parent | 8c0cbb0848430e4de7182dc2fa2f70262d8c77c7 (diff) | |
download | ffmpeg-3713cf11c62df4d993272843c7ef57a1dca3a386.tar.gz |
Fix linesize for some rawvideo samples with odd width.
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r-- | libavcodec/rawdec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 04aa51edc2..6644d6c7e4 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -192,7 +192,13 @@ static int raw_decode(AVCodecContext *avctx, frame->palette_has_changed = 1; } } - if(avctx->pix_fmt==PIX_FMT_BGR24 && ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size) + if((avctx->pix_fmt==PIX_FMT_BGR24 || + avctx->pix_fmt==PIX_FMT_GRAY8 || + avctx->pix_fmt==PIX_FMT_RGB555LE || + avctx->pix_fmt==PIX_FMT_RGB555BE || + avctx->pix_fmt==PIX_FMT_RGB565LE || + avctx->pix_fmt==PIX_FMT_PAL8) && + ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size) frame->linesize[0] = (frame->linesize[0]+3)&~3; if(context->flip) |