Project

General

Profile

mpg123_sigfpe_bug.patch

Andreas Rosvall, March 27, 2012 22:26

View differences:

src/mpg123/mpg123.c
196 196
	{
197 197
		gint64 size = vfs_fsize (file);
198 198
		gint64 samples = mpg123_length (decoder);
199
		gint length = (samples > 0) ? samples * 1000 / rate : 0;
199
		gint length = (samples > 0 && rate > 0) ? samples * 1000 / rate : 0;
200 200

  
201 201
		if (length > 0)
202 202
			tuple_set_int (tuple, FIELD_LENGTH, NULL, length);