videotestsrc: fix 10 bits formats

We need to check the number of bits of the unpack format when we prepare the
pixels for the pack function.
This commit is contained in:
Wim Taymans 2012-07-16 11:16:20 +02:00
parent be369ff630
commit fec11c7809

View file

@ -1133,11 +1133,14 @@ paint_tmpline_AYUV (paintinfo * p, int x, int w)
static void
convert_hline_generic (paintinfo * p, GstVideoFrame * frame, int y)
{
const GstVideoFormatInfo *finfo = frame->info.finfo;
const GstVideoFormatInfo *finfo, *uinfo;
gint i, width = GST_VIDEO_FRAME_WIDTH (frame);
gpointer src;
if (GST_VIDEO_FORMAT_INFO_DEPTH (finfo, 0) == 16) {
finfo = frame->info.finfo;
uinfo = gst_video_format_get_info (finfo->unpack_format);
if (GST_VIDEO_FORMAT_INFO_DEPTH (uinfo, 0) == 16) {
/* 16 bits */
for (i = 0; i < width; i++) {
p->tmpline_u16[i * 4 + 0] = TO_16 (p->tmpline[i * 4 + 0]);