diff options
author | wm4 <wm4@nowhere> | 2013-05-06 20:58:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-06 23:11:11 +0200 |
commit | 885c6a2610619ad3ee2b01ae7ec7670f8551d388 (patch) | |
tree | 7a9d2d4f9516c417e15e16613bb71a87f1feca3f /stream/tvi_v4l2.c | |
parent | ab776adeceb4b9b6ce7adde5a857ffc1e4b2c4ae (diff) | |
download | mpv-885c6a2610619ad3ee2b01ae7ec7670f8551d388.tar.bz2 mpv-885c6a2610619ad3ee2b01ae7ec7670f8551d388.tar.xz |
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.)
Diffstat (limited to 'stream/tvi_v4l2.c')
-rw-r--r-- | stream/tvi_v4l2.c | 27 |
1 files changed, 0 insertions, 27 deletions
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) |