# HG changeset patch
# User Simon Farnsworth <simon.farnsworth@onelan.co.uk>
# Date 1216808000 -3600
# Node ID eeb73d0eab24590e2654cd2c6cfd7e4edbeacef8
# Parent  4c4d4dd22d310b03f9330d9cfac733be02bca3d5
Xv deinterlacing was looking at the input image size, not the output image size.
This works fine on some chipsets, but on others, it causes image corruption.

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@ xine-lib (1.1.15) 2008-??-??
   * V4L: Don't segfault if asked for an input that doesn't exist
   * Recognise AMR audio (normally found in 3GP files).
   * Recognise Snow video.
+  * Xv deinterlacing didn't take the size of the deinterlaced image into
+    account; on some chipsets, this would cause image corruption, while on
+    others, there would be no problem.
 
 xine-lib (1.1.14) 2008-06-29
   * DVB changes:
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -524,7 +524,7 @@ static void xv_deinterlace_frame (xv_dri
     for( i = 0; i < VO_NUM_RECENT_FRAMES; i++ )
       if( this->recent_frames[i] && this->recent_frames[i]->width == frame->width &&
           this->recent_frames[i]->height == frame->height )
-        recent_bitmaps[i] = this->recent_frames[i]->image->data + frame->width*frame->height;
+        recent_bitmaps[i] = this->recent_frames[i]->image->data + this->deinterlace_frame.image->width*frame->height;
       else
         recent_bitmaps[i] = NULL;
 
