Showing the changes to src/src_linear.c (1 of 4 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> | 2 | ** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com> |
| 3 | ** | 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or modify | 4 | ** This program is free software; you can redistribute it and/or modify |
| 5 | ** it under the terms of the GNU General Public License as published by | 5 | ** it under the terms of the GNU General Public License as published by |
| @@ -78,6 +78,10 @@ linear_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) · 72 unmodified lines | |||
| 78 | priv->in_used = priv->out_gen = 0 ; | 78 | priv->in_used = priv->out_gen = 0 ; |
| 79 | 79 | ||
| 80 | src_ratio = psrc->last_ratio ; | 80 | src_ratio = psrc->last_ratio ; |
| 81 | |||
| 82 | if (is_bad_src_ratio (src_ratio)) | ||
| 83 | return SRC_ERR_BAD_INTERNAL_STATE ; | ||
| 84 | |||
| 81 | input_index = psrc->last_position ; | 85 | input_index = psrc->last_position ; |
| 82 | 86 | ||
| 83 | /* Calculate samples before first sample in input array. */ | 87 | /* Calculate samples before first sample in input array. */ |