From 885c6a2610619ad3ee2b01ae7ec7670f8551d388 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 6 May 2013 20:58:54 +0200 Subject: Fix some cppcheck / scan-build warnings These were found by the cppcheck and scan-build static analyzers. Most of these aren't interesting (the 2 previous commits fix some interesting cases found by these analyzers), and they don't nearly fix all warnings. (Most of the unfixed warnings are spam, things MPlayer never cared about, or false positives.) --- stream/tvi_v4l2.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'stream/tvi_v4l2.c') diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index abe455d8bf..06344d1fa9 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -1747,29 +1747,6 @@ static int get_video_framesize(priv_t *priv) return priv->format.fmt.pix.sizeimage; } -//#define DOUBLESPEED -#ifdef DOUBLESPEED -// for testing purposes only -static void read_doublespeed(priv_t *priv) -{ - char *bufx = calloc(priv->audio_in.blocksize, 2); - short *s; - short *d; - int i; - - audio_in_read_chunk(&priv->audio_in, bufx); - audio_in_read_chunk(&priv->audio_in, bufx+priv->audio_in.blocksize); - - s = bufx; - d = priv->audio_ringbuffer+priv->audio_tail*priv->audio_in.blocksize; - for (i = 0; i < priv->audio_in.blocksize/2; i++) { - *d++ = *s++; - *s++; - } - -} -#endif - static void *audio_grabber(void *data) { priv_t *priv = (priv_t*)data; @@ -1788,12 +1765,8 @@ static void *audio_grabber(void *data) for (; !priv->shutdown;) { -#ifdef DOUBLESPEED - read_doublespeed(priv); -#else if (audio_in_read_chunk(&priv->audio_in, priv->audio_ringbuffer+priv->audio_tail*priv->audio_in.blocksize) < 0) continue; -#endif pthread_mutex_lock(&priv->skew_mutex); if (priv->first_frame == 0) { // there is no first frame yet (unlikely to happen) -- cgit v1.2.3