diff options
author | Christian König <[email protected]> | 2016-07-07 11:22:32 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2016-07-08 21:03:32 +0200 |
commit | 6b474e06a210ab2045250035f5e135f7fb39eff2 (patch) | |
tree | aeef167e55608623177e35c44e24bc3571b6ea7a /src/gallium/drivers/radeon/radeon_uvd.c | |
parent | 36df04dac4a2f8a714f2497465cc983dab849246 (diff) |
radeon/uvd: fix contex buffer destruction in the error path
Destroying a not allocated buffer is harmless.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_uvd.c')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_uvd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index 52658fa2393..275d8266c22 100644 --- a/src/gallium/drivers/radeon/radeon_uvd.c +++ b/src/gallium/drivers/radeon/radeon_uvd.c @@ -937,10 +937,7 @@ static void ruvd_destroy(struct pipe_video_codec *decoder) } rvid_destroy_buffer(&dec->dpb); - if ((u_reduce_video_profile(dec->base.profile) == PIPE_VIDEO_FORMAT_HEVC) || - (dec->stream_type == RUVD_CODEC_H264_PERF && - ((struct r600_common_screen*)dec->screen)->family >= CHIP_POLARIS10)) - rvid_destroy_buffer(&dec->ctx); + rvid_destroy_buffer(&dec->ctx); FREE(dec); } @@ -1288,8 +1285,7 @@ error: } rvid_destroy_buffer(&dec->dpb); - if (dec->stream_type == RUVD_CODEC_H264_PERF && info.family >= CHIP_POLARIS10) - rvid_destroy_buffer(&dec->ctx); + rvid_destroy_buffer(&dec->ctx); FREE(dec); |