diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2006-04-05 22:12:17 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2006-04-05 22:12:17 +0000 |
commit | 639bd610bfcb1a028b91a5c3d125045c8de6d8b7 (patch) | |
tree | 6247df0c3a36b4a8eb11e0a764ff3e99632a619b /src/xine-engine | |
parent | 22924ef0924502e0d9b1652651d40270602ee7a0 (diff) | |
download | xine-lib-639bd610bfcb1a028b91a5c3d125045c8de6d8b7.tar.gz xine-lib-639bd610bfcb1a028b91a5c3d125045c8de6d8b7.tar.bz2 |
1) various warning fixes
2) [coverity] fixes:
- 279 (w32): test should be on input parametr type, not typeW
- 267 (aout): can be ignored but there was warning anyway
- 234 (w32): missing free on error & exit
- 152 (w32): missing free on error & exit
- 148 (w32): fixed bound of static array in test
- 101 (ffdec): defense code when avodec_encode_video will fail (just defense to the future,
should never happen with current ffmpeg in xine)
- 98, 99 (w32): check negative handle by _x_assert (it's used as index to array)
- 90 (w32): negate pointer check (+added check for size)
- 89 (w32): added NULL and size check
CVS patchset: 7959
CVS date: 2006/04/05 22:12:17
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/audio_out.c | 4 | ||||
-rw-r--r-- | src/xine-engine/demux.c | 6 | ||||
-rw-r--r-- | src/xine-engine/video_overlay.c | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 57f55ab56..cceccc980 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.200 2006/03/24 20:05:38 dsalt Exp $ + * $Id: audio_out.c,v 1.201 2006/04/05 22:12:20 valtri Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -977,6 +977,7 @@ static void *ao_loop (void *this_gen) { last_sync_time = bufs_since_sync = 0; in_buf = NULL; + cur_time = -1; while ((this->audio_loop_running) || (!this->audio_loop_running && this->out_fifo->first)) { @@ -1034,6 +1035,7 @@ static void *ao_loop (void *this_gen) { } } + _x_assert(cur_time >= 0); if ((in_buf->vpts - cur_time) > 2 * 90000) xprintf (this->xine, XINE_VERBOSITY_DEBUG, "audio_out: vpts/clock error, in_buf->vpts=%" PRId64 " cur_time=%" PRId64 "\n", diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 9a7345d42..40ee9f7d3 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -20,7 +20,7 @@ * Demuxer helper functions * hide some xine engine details from demuxers and reduce code duplication * - * $Id: demux.c,v 1.61 2006/01/24 22:25:34 molivier Exp $ + * $Id: demux.c,v 1.62 2006/04/05 22:12:20 valtri Exp $ */ @@ -634,8 +634,8 @@ void _x_demux_send_mrl_reference (xine_stream_t *stream, int alternative, data.e->alternative = alternative; data.e->start_time = start_time; data.e->duration = duration; - strcpy (data.e->mrl, mrl); - strcpy (data.e->mrl + mrl_len + 1, title ? title : ""); + strcpy((char *)data.e->mrl, mrl); + strcpy((char *)data.e->mrl + mrl_len + 1, title ? title : ""); event.type = XINE_EVENT_MRL_REFERENCE_EXT; xine_event_send (stream, &event); diff --git a/src/xine-engine/video_overlay.c b/src/xine-engine/video_overlay.c index c312aea1a..388649a7e 100644 --- a/src/xine-engine/video_overlay.c +++ b/src/xine-engine/video_overlay.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2006 the xine project * * This file is part of xine, a free video player. * @@ -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_overlay.c,v 1.39 2005/09/25 00:44:04 miguelfreitas Exp $ + * $Id: video_overlay.c,v 1.40 2006/04/05 22:12:20 valtri Exp $ * */ @@ -347,8 +347,8 @@ static int video_overlay_event( video_overlay_t *this, int64_t vpts ) { handle=this->events[this_event].event->object.handle; #ifdef LOG_DEBUG printf ("video_overlay: video_overlay_event: handle = %d\n", handle); - assert(handle >=0); #endif + _x_assert(handle >= 0); switch( this->events[this_event].event->event_type ) { case OVERLAY_EVENT_SHOW: #ifdef LOG_DEBUG |