mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
xan: Check for overlapping copies
No valid samples i found use such copies Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
32cc7ba8a7
commit
bdfe60c769
@ -249,6 +249,12 @@ static inline void xan_wc3_copy_pixel_run(XanContext *s, AVFrame *frame,
|
||||
curframe_x = x;
|
||||
prevframe_index = (y + motion_y) * stride + 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 &&
|
||||
curframe_index < s->frame_size &&
|
||||
prevframe_index < s->frame_size) {
|
||||
|
Loading…
Reference in New Issue
Block a user