]> git.sesse.net Git - vlc/commitdiff
png: encoder: really fix row offset calculation
authorTristan Matthews <tmatth@videolan.org>
Sat, 11 Oct 2014 02:32:13 +0000 (22:32 -0400)
committerTristan Matthews <tmatth@videolan.org>
Sat, 11 Oct 2014 02:33:00 +0000 (22:33 -0400)
modules/codec/png.c

index 46d31af689d2e6a2ebc9557d53184b3b7e77663b..781bacfbd1a81bc953f7c981549df01fda7bcc40 100644 (file)
@@ -405,9 +405,9 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic)
 
     /* Encode picture */
 
-    for( int i = 0; i < p_pic->p->i_lines; i++ )
+    for( int i = 0; i < p_pic->p->i_visible_lines; i++ )
     {
-        png_write_row( p_png, p_pic->p->p_pixels + (i * p_pic->p->i_pitch) );
+        png_write_row( p_png, p_pic->p->p_pixels + (i * p_pic->p->i_visible_pitch) );
         if( p_sys->b_error ) goto error;
     }