mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
va: decoder: render picture only if data
Call vaRenderPicture() only if buffer or slice data is available. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1584>
This commit is contained in:
parent
ad019a1d01
commit
467618f8ac
1 changed files with 18 additions and 14 deletions
|
@ -586,22 +586,26 @@ gst_va_decoder_decode (GstVaDecoder * self, GstVaDecodePicture * pic)
|
|||
goto fail_end_pic;
|
||||
}
|
||||
|
||||
gst_va_display_lock (self->display);
|
||||
status = vaRenderPicture (dpy, self->context,
|
||||
(VABufferID *) pic->buffers->data, pic->buffers->len);
|
||||
gst_va_display_unlock (self->display);
|
||||
if (status != VA_STATUS_SUCCESS) {
|
||||
GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
|
||||
goto fail_end_pic;
|
||||
if (pic->buffers->len > 0) {
|
||||
gst_va_display_lock (self->display);
|
||||
status = vaRenderPicture (dpy, self->context,
|
||||
(VABufferID *) pic->buffers->data, pic->buffers->len);
|
||||
gst_va_display_unlock (self->display);
|
||||
if (status != VA_STATUS_SUCCESS) {
|
||||
GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
|
||||
goto fail_end_pic;
|
||||
}
|
||||
}
|
||||
|
||||
gst_va_display_lock (self->display);
|
||||
status = vaRenderPicture (dpy, self->context,
|
||||
(VABufferID *) pic->slices->data, pic->slices->len);
|
||||
gst_va_display_unlock (self->display);
|
||||
if (status != VA_STATUS_SUCCESS) {
|
||||
GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
|
||||
goto fail_end_pic;
|
||||
if (pic->slices->len > 0) {
|
||||
gst_va_display_lock (self->display);
|
||||
status = vaRenderPicture (dpy, self->context,
|
||||
(VABufferID *) pic->slices->data, pic->slices->len);
|
||||
gst_va_display_unlock (self->display);
|
||||
if (status != VA_STATUS_SUCCESS) {
|
||||
GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
|
||||
goto fail_end_pic;
|
||||
}
|
||||
}
|
||||
|
||||
gst_va_display_lock (self->display);
|
||||
|
|
Loading…
Reference in a new issue