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>
Wed, 30 Apr 2014 20:03:32 +0000 (22:03 +0200)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/opengl_enc.c

index 4e25f19..5f9748d 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)