From d9e8c92bbc90bc0c2d8a4b71059936176bf2d6d0 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 25 Jan 2008 13:30:34 +0000 Subject: Always use xine_xmalloc in plugin class init; avoids uninitialised pointers. --- src/vdr/post_vdr_audio.c | 2 +- src/vdr/post_vdr_video.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vdr') diff --git a/src/vdr/post_vdr_audio.c b/src/vdr/post_vdr_audio.c index ca45ecd35..49de8f9cf 100644 --- a/src/vdr/post_vdr_audio.c +++ b/src/vdr/post_vdr_audio.c @@ -71,7 +71,7 @@ static void vdr_audio_port_put_buffer(xine_audio_port_t *port_gen, aud void *vdr_audio_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof (post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof (post_class_t)); if (!class) return NULL; diff --git a/src/vdr/post_vdr_video.c b/src/vdr/post_vdr_video.c index ff6c32504..4d1055aaf 100644 --- a/src/vdr/post_vdr_video.c +++ b/src/vdr/post_vdr_video.c @@ -94,7 +94,7 @@ static int vdr_video_draw(vo_frame_t *frame, xine_stream_t *stream); void *vdr_video_init_plugin(xine_t *xine, void *data) { - post_class_t *class = (post_class_t *)malloc(sizeof (post_class_t)); + post_class_t *class = (post_class_t *)xine_xmalloc(sizeof (post_class_t)); if (!class) return NULL; -- cgit v1.2.3 From 62edd260de78d783eda0174c65a991389b5343ab Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 4 Feb 2008 16:50:37 +0000 Subject: Silence vdr_video (unless LOG and LOG_VERBOSE are defined). --HG-- extra : transplant_source : %B3%7E6%F5%18%80i%20rb%10m%8AA8G%87%F5%A8r --- src/vdr/post_vdr_video.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/vdr') diff --git a/src/vdr/post_vdr_video.c b/src/vdr/post_vdr_video.c index 4d1055aaf..178538655 100644 --- a/src/vdr/post_vdr_video.c +++ b/src/vdr/post_vdr_video.c @@ -23,9 +23,9 @@ */ #define LOG_MODULE "vdr_video" -#define LOG_VERBOSE /* #define LOG +#define LOG_VERBOSE */ #include @@ -437,12 +437,14 @@ static int vdr_video_draw(vo_frame_t *frame, xine_stream_t *stream) frame->next->pts = 0; } */ +#if defined(LOG) && defined(LOG_VERBOSE) { int a = 0, b = 0, c = 0, d = 0; if (stream) _x_query_buffer_usage(stream, &a, &b, &c, &d); - fprintf(stderr, "buffer usage: %3d, %2d, %2d, %2d, %p\n", a, b, c, d, stream); + lprintf("buffer usage: %3d, %2d, %2d, %2d, %p\n", a, b, c, d, stream); } +#endif if (!this->enabled || frame->bad_frame -- cgit v1.2.3