summaryrefslogtreecommitdiff
path: root/libavcodec/rawdec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-06-30 09:02:14 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-06-30 09:02:14 +0200
commit3713cf11c62df4d993272843c7ef57a1dca3a386 (patch)
tree83bba649cad6bb60f9a5737bc1658b635be7ae30 /libavcodec/rawdec.c
parent8c0cbb0848430e4de7182dc2fa2f70262d8c77c7 (diff)
downloadffmpeg-3713cf11c62df4d993272843c7ef57a1dca3a386.tar.gz
Fix linesize for some rawvideo samples with odd width.
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c8
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)