comparison imgconvert.c @ 4802:e02f7d142ce9 libavcodec

Fix segmentation fault for gray16le to gray conversion.
author ivo
date Sat, 07 Apr 2007 19:24:27 +0000
parents 6a900f539e2c
children cf6608b00186
comparison
equal deleted inserted replaced
4801:66ef3690d108 4802:e02f7d142ce9
1884 } 1884 }
1885 1885
1886 static void gray16le_to_gray(AVPicture *dst, const AVPicture *src, 1886 static void gray16le_to_gray(AVPicture *dst, const AVPicture *src,
1887 int width, int height) 1887 int width, int height)
1888 { 1888 {
1889 gray16_to_gray(dst, src + 1, width, height); 1889 AVPicture tmpsrc = *src;
1890 tmpsrc.data[0]++;
1891 gray16_to_gray(dst, &tmpsrc, width, height);
1890 } 1892 }
1891 1893
1892 static void gray16_to_gray16(AVPicture *dst, const AVPicture *src, 1894 static void gray16_to_gray16(AVPicture *dst, const AVPicture *src,
1893 int width, int height) 1895 int width, int height)
1894 { 1896 {