mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +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;
|
goto fail_end_pic;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_va_display_lock (self->display);
|
if (pic->buffers->len > 0) {
|
||||||
status = vaRenderPicture (dpy, self->context,
|
gst_va_display_lock (self->display);
|
||||||
(VABufferID *) pic->buffers->data, pic->buffers->len);
|
status = vaRenderPicture (dpy, self->context,
|
||||||
gst_va_display_unlock (self->display);
|
(VABufferID *) pic->buffers->data, pic->buffers->len);
|
||||||
if (status != VA_STATUS_SUCCESS) {
|
gst_va_display_unlock (self->display);
|
||||||
GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
|
if (status != VA_STATUS_SUCCESS) {
|
||||||
goto fail_end_pic;
|
GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
|
||||||
|
goto fail_end_pic;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_va_display_lock (self->display);
|
if (pic->slices->len > 0) {
|
||||||
status = vaRenderPicture (dpy, self->context,
|
gst_va_display_lock (self->display);
|
||||||
(VABufferID *) pic->slices->data, pic->slices->len);
|
status = vaRenderPicture (dpy, self->context,
|
||||||
gst_va_display_unlock (self->display);
|
(VABufferID *) pic->slices->data, pic->slices->len);
|
||||||
if (status != VA_STATUS_SUCCESS) {
|
gst_va_display_unlock (self->display);
|
||||||
GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
|
if (status != VA_STATUS_SUCCESS) {
|
||||||
goto fail_end_pic;
|
GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
|
||||||
|
goto fail_end_pic;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_va_display_lock (self->display);
|
gst_va_display_lock (self->display);
|
||||||
|
|
Loading…
Reference in a new issue