Skip to content
Snippets Groups Projects
Commit bdfe60c7 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

xan: Check for overlapping copies


No valid samples i found use such copies

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 32cc7ba8
No related branches found
No related tags found
No related merge requests found
...@@ -249,6 +249,12 @@ static inline void xan_wc3_copy_pixel_run(XanContext *s, AVFrame *frame, ...@@ -249,6 +249,12 @@ static inline void xan_wc3_copy_pixel_run(XanContext *s, AVFrame *frame,
curframe_x = x; curframe_x = x;
prevframe_index = (y + motion_y) * stride + x + motion_x; prevframe_index = (y + motion_y) * stride + x + motion_x;
prevframe_x = x + motion_x; prevframe_x = x + motion_x;
if (prev_palette_plane == palette_plane && FFABS(curframe_index - prevframe_index) < pixel_count) {
avpriv_request_sample(s->avctx, "Overlapping copy\n");
return ;
}
while (pixel_count && while (pixel_count &&
curframe_index < s->frame_size && curframe_index < s->frame_size &&
prevframe_index < s->frame_size) { prevframe_index < s->frame_size) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment