radeon/vcn: add decode message destroy
authorLeo Liu <leo.liu@amd.com>
Tue, 2 May 2017 20:22:26 +0000 (16:22 -0400)
committerLeo Liu <leo.liu@amd.com>
Thu, 25 May 2017 15:40:20 +0000 (11:40 -0400)
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_vcn_dec.c

index a61620ddba66a6283b1d154ba781b928ad2a4159..d213de5e387d7584c5397fdfa943e3b8bce020f1 100644 (file)
@@ -118,7 +118,16 @@ static struct pb_buffer *rvcn_dec_message_decode(struct radeon_decoder *dec)
 
 static void rvcn_dec_message_destroy(struct radeon_decoder *dec)
 {
-       /* TODO */
+       rvcn_dec_message_header_t *header = dec->msg;
+
+       memset(dec->msg, 0, sizeof(rvcn_dec_message_header_t));
+       header->header_size = sizeof(rvcn_dec_message_header_t);
+       header->total_size = sizeof(rvcn_dec_message_header_t) -
+                       sizeof(rvcn_dec_message_index_t);
+       header->num_buffers = 0;
+       header->msg_type = RDECODE_MSG_DESTROY;
+       header->stream_handle = dec->stream_handle;
+       header->status_report_feedback_number = 0;
 }
 
 static void rvcn_dec_message_feedback(struct radeon_decoder *dec)