Mercurial > mplayer.hg
changeset 30930:0f14ab03ec98
Fix crash with incomplete yuv2 frames.
author | reimar |
---|---|
date | Sun, 28 Mar 2010 00:08:28 +0000 |
parents | e97f3f59fb19 |
children | 8e2888bae70b |
files | libmpcodecs/vd_raw.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_raw.c Sat Mar 27 19:45:59 2010 +0000 +++ b/libmpcodecs/vd_raw.c Sun Mar 28 00:08:28 2010 +0000 @@ -124,7 +124,7 @@ #endif } frame_size=mpi->stride[0]*mpi->h; - if (format == MKTAG('y', 'u', 'v', '2')) { + if (len >= frame_size && format == MKTAG('y', 'u', 'v', '2')) { int i; for (i = 1; i < frame_size; i += 2) mpi->planes[0][i] ^= 128;