diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-11 09:03:51 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-11 09:03:51 +0000 |
commit | 2748ef6cbc482cf739a0c20c54acd3634091191c (patch) | |
tree | 2a7dccfc98ad9415a0eca72a825473fba890e4ec | |
parent | 949bc4183444bf5c259147c2c673897e0d45cd4b (diff) | |
download | xine-lib-2748ef6cbc482cf739a0c20c54acd3634091191c.tar.gz xine-lib-2748ef6cbc482cf739a0c20c54acd3634091191c.tar.bz2 |
Re-use the same profiler id (after pthread_exit -> pthread_create)
CVS patchset: 609
CVS date: 2001/09/11 09:03:51
-rw-r--r-- | src/xine-engine/audio_decoder.c | 7 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 11 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 12 |
3 files changed, 22 insertions, 8 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index f85ee2d29..79f79b17b 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.36 2001/09/10 13:36:56 jkeil Exp $ + * $Id: audio_decoder.c,v 1.37 2001/09/11 09:03:51 jkeil Exp $ * * * functions that implement audio decoding @@ -41,7 +41,10 @@ void *audio_decoder_loop (void *this_gen) { int running = 1; int i,j; audio_decoder_t *decoder; - int prof_audio_decode = profiler_allocate_slot ("audio decoder/output"); + static int prof_audio_decode = -1; + + if (prof_audio_decode == -1) + prof_audio_decode = profiler_allocate_slot ("audio decoder/output"); while (running) { diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 4005c3b4e..ab86afa0b 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.48 2001/09/10 13:36:56 jkeil Exp $ + * $Id: video_decoder.c,v 1.49 2001/09/11 09:03:51 jkeil Exp $ * */ @@ -55,8 +55,13 @@ void *video_decoder_loop (void *this_gen) { int streamtype; video_decoder_t *decoder; spu_decoder_t *spu_decoder; - int prof_video_decode = profiler_allocate_slot ("video decoder"); - int prof_spu_decode = profiler_allocate_slot ("spu decoder"); + static int prof_video_decode = -1; + static int prof_spu_decode = -1; + + if (prof_video_decode == -1) + prof_video_decode = profiler_allocate_slot ("video decoder"); + if (prof_spu_decode == -1) + prof_spu_decode = profiler_allocate_slot ("spu decoder"); while (running) { diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 3eb7ddff9..3b8642c6a 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.43 2001/09/10 13:36:56 jkeil Exp $ + * $Id: video_out.c,v 1.44 2001/09/11 09:03:51 jkeil Exp $ * */ @@ -143,13 +143,19 @@ static void *video_out_loop (void *this_gen) { uint32_t video_step, video_step_new; vo_instance_t *this = (vo_instance_t *) this_gen; sigset_t vo_mask; - int prof_video_out = profiler_allocate_slot ("video output"); - int prof_spu_blend = profiler_allocate_slot ("spu blend"); + static int prof_video_out = -1; + static int prof_spu_blend = -1; /* int dummysignum; */ /* printf ("%d video_out start\n", getpid()); */ + + if (prof_video_out == -1) + prof_video_out = profiler_allocate_slot ("video output"); + if (prof_spu_blend == -1) + prof_spu_blend = profiler_allocate_slot ("spu blend"); + /* sigemptyset(&vo_mask); sigaddset(&vo_mask, SIGALRM); |