[Libva] [PATCH] Remove if(1) statement is constant
Lim Siew Hoon
siew.hoon.lim at intel.com
Thu Jun 23 03:18:16 UTC 2016
Signed-off-by: Lim Siew Hoon <siew.hoon.lim at intel.com>
---
test/encode/mpeg2vaenc.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/test/encode/mpeg2vaenc.c b/test/encode/mpeg2vaenc.c
index f49af27..93888d9 100644
--- a/test/encode/mpeg2vaenc.c
+++ b/test/encode/mpeg2vaenc.c
@@ -1373,17 +1373,15 @@ encode_picture(struct mpeg2enc_context *ctx,
begin_picture(ctx, coded_order, display_order, picture_type);
- if (1) {
- /* upload YUV data to VA surface for next frame */
- if (next_display_order >= ctx->num_pictures)
- next_display_order = ctx->num_pictures - 1;
-
- fseek(ctx->ifp, ctx->frame_size * next_display_order, SEEK_SET);
- ctx->upload_thread_value = pthread_create(&ctx->upload_thread_id,
- NULL,
- upload_yuv_to_surface,
- ctx);
- }
+ /* upload YUV data to VA surface for next frame */
+ if (next_display_order >= ctx->num_pictures)
+ next_display_order = ctx->num_pictures - 1;
+
+ fseek(ctx->ifp, ctx->frame_size * next_display_order, SEEK_SET);
+ ctx->upload_thread_value = pthread_create(&ctx->upload_thread_id,
+ NULL,
+ upload_yuv_to_surface,
+ ctx);
do {
mpeg2enc_destroy_buffers(ctx, &ctx->codedbuf_buf_id, 1);
--
2.1.0
More information about the Libva
mailing list