changeset 4802:e02f7d142ce9 libavcodec

Fix segmentation fault for gray16le to gray conversion.
author ivo
date Sat, 07 Apr 2007 19:24:27 +0000
parents 66ef3690d108
children 35e47a6e01e2
files imgconvert.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/imgconvert.c	Sat Apr 07 17:37:30 2007 +0000
+++ b/imgconvert.c	Sat Apr 07 19:24:27 2007 +0000
@@ -1886,7 +1886,9 @@
 static void gray16le_to_gray(AVPicture *dst, const AVPicture *src,
                               int width, int height)
 {
-    gray16_to_gray(dst, src + 1, width, height);
+    AVPicture tmpsrc = *src;
+    tmpsrc.data[0]++;
+    gray16_to_gray(dst, &tmpsrc, width, height);
 }
 
 static void gray16_to_gray16(AVPicture *dst, const AVPicture *src,