summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2014-05-12 12:57:18 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2014-05-12 18:26:12 -0400
commit4f84a6124a719c2a9c927b5e91b36f5d5b20d617 (patch)
treead0ad923a2568e567ae194e32b9cace3800f48a0
parentce7319c62da1e5deea16772253ddb9fd9ffaacfe (diff)
downloadgstreamer-plugins-bad-4f84a6124a719c2a9c927b5e91b36f5d5b20d617.tar.gz
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.
-rw-r--r--gst-libs/gst/gl/gstglupload.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
index 4c3193ecc..30ea9db69 100644
--- a/gst-libs/gst/gl/gstglupload.c
+++ b/gst-libs/gst/gl/gstglupload.c
@@ -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);