diff options
author | Grigori Goronzy <[email protected]> | 2014-03-02 12:57:03 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2014-03-03 18:37:35 +0100 |
commit | 86c06871a282ec60e81d0cbabc3b1d661bc33c75 (patch) | |
tree | db51a19b7858ca133793600bb2d28ecfc4769a2f /src/gallium/state_trackers/vdpau/mixer.c | |
parent | bd6654aa38b75faee4d016aecfe2b1dd0dbbb78b (diff) |
st/vdpau: fix possible NULL dereference
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/mixer.c')
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index 996fd8e1602..e6bfb8cbc43 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -242,16 +242,16 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, compositor = &vmixer->device->compositor; surf = vlGetDataHTAB(video_surface_current); - video_buffer = surf->video_buffer; if (!surf) return VDP_STATUS_INVALID_HANDLE; + video_buffer = surf->video_buffer; if (surf->device != vmixer->device) return VDP_STATUS_HANDLE_DEVICE_MISMATCH; - if (vmixer->video_width > surf->video_buffer->width || - vmixer->video_height > surf->video_buffer->height || - vmixer->chroma_format != surf->video_buffer->chroma_format) + if (vmixer->video_width > video_buffer->width || + vmixer->video_height > video_buffer->height || + vmixer->chroma_format != video_buffer->chroma_format) return VDP_STATUS_INVALID_SIZE; if (layer_count > vmixer->max_layers) |