changeset 4333:018b316baca7 libavcodec

maybe fixing a segfault
author michael
date Wed, 03 Jan 2007 11:32:02 +0000
parents 35812973e0bc
children bc434522dfc2
files wmv2.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/wmv2.c	Wed Jan 03 00:48:20 2007 +0000
+++ b/wmv2.c	Wed Jan 03 11:32:02 2007 +0000
@@ -643,6 +643,12 @@
     v_edge_pos = s->v_edge_pos;
     src_x = clip(src_x, -16, s->width);
     src_y = clip(src_y, -16, s->height);
+
+    if(src_x<=-16 || src_x >= s->width)
+        dxy &= ~3;
+    if(src_y<=-16 || src_y >= s->height)
+        dxy &= ~4;
+
     linesize   = s->linesize;
     uvlinesize = s->uvlinesize;
     ptr = ref_picture[0] + (src_y * linesize) + src_x;