comparison imgconvert.c @ 10510:26fcf45bb486 libavcodec

Fix palette copying in av_picture_copy(). Previous code worked only if linesize[1] == 1, which does not make sense.
author vitor
date Tue, 10 Nov 2009 19:36:58 +0000
parents cdf5b1ed3500
children 526cab0b961a
comparison
equal deleted inserted replaced
10509:cdf5b1ed3500 10510:26fcf45bb486
1182 case FF_PIXEL_PALETTE: 1182 case FF_PIXEL_PALETTE:
1183 ff_img_copy_plane(dst->data[0], dst->linesize[0], 1183 ff_img_copy_plane(dst->data[0], dst->linesize[0],
1184 src->data[0], src->linesize[0], 1184 src->data[0], src->linesize[0],
1185 width, height); 1185 width, height);
1186 /* copy the palette */ 1186 /* copy the palette */
1187 ff_img_copy_plane(dst->data[1], dst->linesize[1], 1187 memcpy(dst->data[1], src->data[1], 4*256);
1188 src->data[1], src->linesize[1],
1189 4, 256);
1190 break; 1188 break;
1191 } 1189 }
1192 } 1190 }
1193 1191
1194 /* 2x2 -> 1x1 */ 1192 /* 2x2 -> 1x1 */