[vlc-commits] png: encoder: really fix row offset calculation

Tristan Matthews git at videolan.org
Sat Oct 11 04:37:45 CEST 2014


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Fri Oct 10 22:32:13 2014 -0400| [47431e192bbaefe723c7b6915a54f3ab4ca440e8] | committer: Tristan Matthews

png: encoder: really fix row offset calculation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=47431e192bbaefe723c7b6915a54f3ab4ca440e8
---

 modules/codec/png.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 46d31af..781bacf 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -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;
     }
 



More information about the vlc-commits mailing list