Mercurial > libavcodec.hg
changeset 8265:bb310197d59f libavcodec
Print out some errors found during MS RLE decoding
author | kostya |
---|---|
date | Sat, 06 Dec 2008 09:01:11 +0000 |
parents | 48dcf657f897 |
children | ce2bb0ae8587 |
files | msrledec.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/msrledec.c Sat Dec 06 08:57:31 2008 +0000 +++ b/msrledec.c Sat Dec 06 09:01:11 2008 +0000 @@ -145,8 +145,10 @@ p2 = *src++; if(p2 == 0) { //End-of-line output = pic->data[0] + (--line) * pic->linesize[0]; - if (line < 0) + if (line < 0){ + av_log(avctx, AV_LOG_ERROR, "Next line is beyond picture bounds\n"); return -1; + } pos = 0; continue; } else if(p2 == 1) { //End-of-picture @@ -155,8 +157,10 @@ p1 = *src++; p2 = *src++; line -= p2; - if (line < 0) + if (line < 0){ + av_log(avctx, AV_LOG_ERROR, "Skip beyond picture bounds\n"); return -1; + } pos += p1; output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3); continue;