lavd/opengl_enc: fix pixel data alignment
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Wed, 30 Apr 2014 18:49:52 +0000 (20:49 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 4 May 2014 22:09:17 +0000 (00:09 +0200)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8ff72924cfeb3c8fa8fc57cfea3f78ca0caaec0f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/opengl_enc.c

index 1b99390..5ca0c02 100644 (file)
@@ -1204,6 +1204,8 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
     glClear(GL_COLOR_BUFFER_BIT);
 
     if (!repaint) {
+        if (is_pkt)
+            glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
         LOAD_TEXTURE_DATA(0, 0)
         if (desc->flags & AV_PIX_FMT_FLAG_PLANAR) {
             LOAD_TEXTURE_DATA(1, 1)