applemedia: init videoinfo

This commit is contained in:
Mark Nauwelaerts 2012-09-18 13:17:55 +02:00
parent 7cf43c7b93
commit 9cb0cc216d
2 changed files with 2 additions and 0 deletions

View file

@ -109,6 +109,7 @@ gst_core_video_buffer_new (GstCoreMediaCtx * ctx, CVBufferRef cvbuf,
stride[i] = cv->CVPixelBufferGetBytesPerRowOfPlane (pixbuf, i);
/* FIXME: don't hardcode NV12 */
gst_video_info_init (&tmp_vinfo);
gst_video_info_set_format (&tmp_vinfo,
GST_VIDEO_FORMAT_NV12, stride[0], height);
offset[1] = tmp_vinfo.offset[1];

View file

@ -219,6 +219,7 @@ gst_vtdec_sink_setcaps (GstVTDec * self, GstCaps * caps)
if (!gst_structure_get_int (structure, "height", &height))
goto incomplete_caps;
gst_video_info_init (&self->vinfo);
gst_video_info_set_format (&self->vinfo, format, width, height);
if (gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)) {