mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 09:35:22 +00:00
Merge commit 'da7baaaae79b4d7d715d35ea6bcfbdd149edc177'
* commit 'da7baaaae79b4d7d715d35ea6bcfbdd149edc177':
aasc: fix output for msrle compression.
msrledec: check bounds before constructing a possibly invalid pointer,
cmdutils: remove ansi from the list of broken codecs.
Conflicts:
tests/ref/fate/aasc
Also See: e7117f1c10
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
ddc3ca2caa
@ -1856,7 +1856,7 @@ static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbu
|
|||||||
/* XXX this shouldn't be needed, but some tests break without this line
|
/* XXX this shouldn't be needed, but some tests break without this line
|
||||||
* those decoders are buggy and need to be fixed.
|
* those decoders are buggy and need to be fixed.
|
||||||
* the following tests fail:
|
* the following tests fail:
|
||||||
* ansi, aasc, fraps-v1, qtrle-1bit
|
* fraps-v1, qtrle-1bit
|
||||||
*/
|
*/
|
||||||
memset(buf->base[0], 128, ret);
|
memset(buf->base[0], 128, ret);
|
||||||
|
|
||||||
|
@ -144,8 +144,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
|||||||
if(p1 == 0) { //Escape code
|
if(p1 == 0) { //Escape code
|
||||||
p2 = bytestream2_get_byte(gb);
|
p2 = bytestream2_get_byte(gb);
|
||||||
if(p2 == 0) { //End-of-line
|
if(p2 == 0) { //End-of-line
|
||||||
output = pic->data[0] + (--line) * pic->linesize[0];
|
if (--line < 0) {
|
||||||
if (line < 0) {
|
|
||||||
if (bytestream2_get_be16(gb) == 1) { // end-of-picture
|
if (bytestream2_get_be16(gb) == 1) { // end-of-picture
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
@ -155,6 +154,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
output = pic->data[0] + line * pic->linesize[0];
|
||||||
pos = 0;
|
pos = 0;
|
||||||
continue;
|
continue;
|
||||||
} else if(p2 == 1) { //End-of-picture
|
} else if(p2 == 1) { //End-of-picture
|
||||||
|
Loading…
Reference in New Issue
Block a user