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.
This commit is contained in:
parent
c16ab9e66b
commit
2f705ac9ca
@ -369,7 +369,6 @@ gst_gl_upload_release_buffer (GstGLUpload * upload)
|
|||||||
static gboolean
|
static gboolean
|
||||||
_do_upload_for_meta (GstGLUpload * upload, GstVideoGLTextureUploadMeta * meta)
|
_do_upload_for_meta (GstGLUpload * upload, GstVideoGLTextureUploadMeta * meta)
|
||||||
{
|
{
|
||||||
GstVideoMeta *v_meta;
|
|
||||||
GstVideoInfo in_info;
|
GstVideoInfo in_info;
|
||||||
GstVideoFrame frame;
|
GstVideoFrame frame;
|
||||||
GstMemory *mem;
|
GstMemory *mem;
|
||||||
@ -392,20 +391,15 @@ _do_upload_for_meta (GstGLUpload * upload, GstVideoGLTextureUploadMeta * meta)
|
|||||||
return TRUE;
|
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,
|
if (!gst_video_frame_map (&frame, &in_info, upload->priv->buffer,
|
||||||
GST_MAP_READ)) {
|
GST_MAP_READ)) {
|
||||||
GST_ERROR ("failed to map video frame");
|
GST_ERROR ("failed to map video frame");
|
||||||
return FALSE;
|
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,
|
ret = _gst_gl_upload_perform_with_data_unlocked (upload,
|
||||||
upload->out_tex->tex_id, frame.data);
|
upload->out_tex->tex_id, frame.data);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user