summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_xxmc.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-09 17:51:40 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-09 17:51:40 +0200
commit902d66eb8304ccffdb683b7130e9f548011b8d30 (patch)
tree9cdd73b5f68131ba2d4944d17e183b4313bdb559 /src/video_out/video_out_xxmc.c
parenta51427608e2f4543ae0cb0598517a1e4f6b0928b (diff)
downloadxine-lib-902d66eb8304ccffdb683b7130e9f548011b8d30.tar.gz
xine-lib-902d66eb8304ccffdb683b7130e9f548011b8d30.tar.bz2
Avoid loop for common memory operations (zeroing, copying, moving).
Use the proper function for common memory operations (memset() for zeroing, memcpy() for copying, memmove() for moving), instead of looping through arrays. By extension, remove loops to reset arrays when they were allocated with calloc() and thus already zeroed.
Diffstat (limited to 'src/video_out/video_out_xxmc.c')
-rw-r--r--src/video_out/video_out_xxmc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c
index 07dafa12d..0fedde6c6 100644
--- a/src/video_out/video_out_xxmc.c
+++ b/src/video_out/video_out_xxmc.c
@@ -162,14 +162,10 @@ static void xxmc_xvmc_surface_handler_construct(xxmc_driver_t *this)
xvmc_surface_handler_t *handler = &this->xvmc_surf_handler;
pthread_mutex_init(&handler->mutex,NULL);
- for (i=0; i<XVMC_MAX_SURFACES; ++i) {
- handler->surfInUse[i] = 0;
- handler->surfValid[i] = 0;
- }
- for (i=0; i<XVMC_MAX_SUBPICTURES; ++i) {
- handler->subInUse[i] = 0;
- handler->subValid[i] = 0;
- }
+ memset(handler->surfInUse, 0, sizeof(handler->surfInuse));
+ memset(handler->surfValid, 0, sizeof(handler->surfValid));
+ memset(handler->subInUse, 0, sizeof(handler->subInUse));
+ memset(handler->subValid, 0, sizeof(handler->subValid));
}
static void xxmc_xvmc_destroy_surfaces(xxmc_driver_t *this)