]> git.videolan.org Git - x264.git/commitdiff
Fix crash in fake-interlaced at some resolutions
authorJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 8 Jun 2010 22:38:32 +0000 (15:38 -0700)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Wed, 9 Jun 2010 18:35:37 +0000 (11:35 -0700)
common/frame.c

index 9d630f8c72ba6efed55a0beaf2816fc312883502..44c579e3d3389df1e5fdaec8e8841ab3e89e5759 100644 (file)
@@ -40,9 +40,9 @@ x264_frame_t *x264_frame_new( x264_t *h, int b_fdec )
     CHECKED_MALLOCZERO( frame, sizeof(x264_frame_t) );
 
     /* allocate frame data (+64 for extra data for me) */
-    i_width  = ALIGN( h->param.i_width, 16 );
+    i_width  = h->sps->i_mb_width*16;
     i_stride = ALIGN( i_width + 2*PADH, align );
-    i_lines  = ALIGN( h->param.i_height, 16<<h->param.b_interlaced );
+    i_lines  = h->sps->i_mb_height*16;
 
     frame->i_plane = 3;
     for( int i = 0; i < 3; i++ )