[Mesa-dev] [PATCH 3/4] radeon/uvd: fix contex buffer destruction in the error path
Christian König
deathsimple at vodafone.de
Thu Jul 7 09:57:17 UTC 2016
From: Christian König <christian.koenig at amd.com>
Destroying a not allocated buffer is harmless.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
src/gallium/drivers/radeon/radeon_uvd.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index 52658fa..275d826 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);
--
2.5.0
More information about the mesa-dev
mailing list