[MPlayer-dev-eng] [PATCH] qtrle lines_to_change in header is actually last line?
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Oct 14 16:24:29 CEST 2006
Hello,
can someone try to find out if the attached patch is correct?.
It avoids this warning:
"[qtrle @ 0xd96950]Problem: stream_ptr out of bounds (21760 >= 21759)"
with this file:
http://www.gfdl.noaa.gov/products/vis/animation/example1/ferret.mov
and the fact the end of the frame data with this patch matches perfectly
makes me think it is correct.
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libavcodec/qtrle.c
===================================================================
--- libavcodec/qtrle.c (revision 6688)
+++ libavcodec/qtrle.c (working copy)
@@ -106,6 +106,7 @@
stream_ptr += 4;
lines_to_change = BE_16(&s->buf[stream_ptr]);
stream_ptr += 4;
+ lines_to_change = FFMAX(lines_to_change - start_line, 0);
} else {
start_line = 0;
lines_to_change = s->avctx->height;
@@ -197,6 +198,7 @@
stream_ptr += 4;
lines_to_change = BE_16(&s->buf[stream_ptr]);
stream_ptr += 4;
+ lines_to_change = FFMAX(lines_to_change - start_line, 0);
} else {
start_line = 0;
lines_to_change = s->avctx->height;
@@ -279,6 +281,7 @@
stream_ptr += 4;
lines_to_change = BE_16(&s->buf[stream_ptr]);
stream_ptr += 4;
+ lines_to_change = FFMAX(lines_to_change - start_line, 0);
} else {
start_line = 0;
lines_to_change = s->avctx->height;
@@ -357,6 +360,7 @@
stream_ptr += 4;
lines_to_change = BE_16(&s->buf[stream_ptr]);
stream_ptr += 4;
+ lines_to_change = FFMAX(lines_to_change - start_line, 0);
} else {
start_line = 0;
lines_to_change = s->avctx->height;
@@ -437,6 +441,7 @@
stream_ptr += 4;
lines_to_change = BE_16(&s->buf[stream_ptr]);
stream_ptr += 4;
+ lines_to_change = FFMAX(lines_to_change - start_line, 0);
} else {
start_line = 0;
lines_to_change = s->avctx->height;
More information about the MPlayer-dev-eng
mailing list