Commit 4f84a612 authored by Nicolas Dufresne's avatar Nicolas Dufresne

glupload: Correctly update video info in upload fallback

When the upload accelerated method fails, we fallback to an upload,
but the video info was not correctly updated.
parent ce7319c6
......@@ -369,7 +369,6 @@ gst_gl_upload_release_buffer (GstGLUpload * upload)
static gboolean
_do_upload_for_meta (GstGLUpload * upload, GstVideoGLTextureUploadMeta * meta)
{
GstVideoMeta *v_meta;
GstVideoInfo in_info;
GstVideoFrame frame;
GstMemory *mem;
......@@ -392,20 +391,15 @@ _do_upload_for_meta (GstGLUpload * upload, GstVideoGLTextureUploadMeta * meta)
return TRUE;
}
v_meta = gst_buffer_get_video_meta (upload->priv->buffer);
if (v_meta == NULL)
return FALSE;
gst_video_info_set_format (&in_info, v_meta->format, v_meta->width,
v_meta->height);
if (!gst_video_frame_map (&frame, &in_info, upload->priv->buffer,
GST_MAP_READ)) {
GST_ERROR ("failed to map video frame");
return FALSE;
}
/* update the video info from the one updated by frame_map using video meta */
gst_gl_upload_set_format (upload, &upload->priv->frame.info);
ret = _gst_gl_upload_perform_with_data_unlocked (upload,
upload->out_tex->tex_id, frame.data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment