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 | 4 | ** This program is free software; you can redistribute it and/or modify |
| 5 | 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 | 78 | priv->in_used = priv->out_gen = 0 ; |
| 79 | 79 | |
| 80 | 80 | src_ratio = psrc->last_ratio ; |
| 81 | + | |
| 82 | + if (is_bad_src_ratio (src_ratio)) | |
| 83 | + return SRC_ERR_BAD_INTERNAL_STATE ; | |
| 84 | + | |
| 81 | 85 | input_index = psrc->last_position ; |
| 82 | 86 | |
| 83 | 87 | /* Calculate samples before first sample in input array. */ |