summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2013-08-16 23:10:20 +0100
committerChristian König <[email protected]>2013-08-19 18:32:03 +0200
commit5e91c152902dc32b9042faddf186146860095ecb (patch)
tree73b9f87b451e5f9e18362cef6b04185f774c28cc /src/gallium
parent3448b66dac521fb16ccaa7cdf3427343a6e355a2 (diff)
st/vdpau: don't try to create video buffer when the format is FORMAT_NONE
Not seen in the wild yet, but seems like a reasonable thing to do. [suggested by Christian] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/vdpau/surface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index ab4d725cb36..8e39d68a706 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -88,7 +88,10 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CAP_PREFERS_INTERLACED
);
- p_surf->video_buffer = pipe->create_video_buffer(pipe, &p_surf->templat);
+ if (p_surf->templat.buffer_format != PIPE_FORMAT_NONE)
+ p_surf->video_buffer = pipe->create_video_buffer(pipe, &p_surf->templat);
+
+ /* do not mandate early allocation of a video buffer */
vlVdpVideoSurfaceClear(p_surf);
pipe_mutex_unlock(dev->mutex);