Unified · Split
| @@ -3,6 +3,10 @@ · 2 unmodified lines | ||
| 3 | 3 | * tests/misc_test.c |
| 4 | 4 | Add zero_input_test() from debian bug #506722. |
| 5 | 5 | |
| 6 | + * src/src_linear.c src/src_zoh.c | |
| 7 | + Fix for bug in zero_input_test(). Both these converters crashed if the | |
| 8 | + input_frames field of SRC_DATA was zero. | |
| 9 | + | |
| 6 | 10 | 2009-09-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com> |
| 7 | 11 | |
| 8 | 12 | * M4/endian.m4 |
| @@ -58,6 +58,9 @@ linear_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) · 57 unmodified lines | ||
| 58 | 58 | double src_ratio, input_index, rem ; |
| 59 | 59 | int ch ; |
| 60 | 60 | |
| 61 | + if (data->input_frames <= 0) | |
| 62 | + return SRC_ERR_NO_ERROR ; | |
| 63 | + | |
| 61 | 64 | if (psrc->private_data == NULL) |
| 62 | 65 | return SRC_ERR_NO_PRIVATE ; |
| 63 | 66 | |
| @@ -56,6 +56,9 @@ zoh_vari_process (SRC_PRIVATE *psrc, SRC_DATA *data) · 55 unmodified lines | ||
| 56 | 56 | double src_ratio, input_index, rem ; |
| 57 | 57 | int ch ; |
| 58 | 58 | |
| 59 | + if (data->input_frames <= 0) | |
| 60 | + return SRC_ERR_NO_ERROR ; | |
| 61 | + | |
| 59 | 62 | if (psrc->private_data == NULL) |
| 60 | 63 | return SRC_ERR_NO_PRIVATE ; |
| 61 | 64 | |