summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Marek <[email protected]>2014-04-30 20:49:52 +0200
committerMichael Niedermayer <[email protected]>2014-05-05 00:09:17 +0200
commitc9c223ba0028498969019d4c133375b7c8d6c240 (patch)
treee8579736ef88f6443a312c48a394aefbf09d750c
parent9d0ff6436ef748f9f81eb5e4cfe93c34461a9997 (diff)
lavd/opengl_enc: fix pixel data alignment
Signed-off-by: Lukasz Marek <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 8ff72924cfeb3c8fa8fc57cfea3f78ca0caaec0f) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavdevice/opengl_enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 1b993906f8..5ca0c02d07 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -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)