GstClockTime timestamp, next_timestamp, duration;
guint64 pos, nextpos;
+ if (aiff->bytes_per_sample <= 0) {
+ GST_ELEMENT_ERROR (aiff, STREAM, WRONG_TYPE, (NULL),
+ ("File is not a valid AIFF file (invalid bytes per sample)"));
+ return GST_FLOW_ERROR;
+ }
+
iterate_adapter:
GST_LOG_OBJECT (aiff,
"offset: %" G_GINT64_FORMAT " , end: %" G_GINT64_FORMAT " , dataleft: %"
MIN (gst_guint64_to_gdouble (aiff->dataleft),
aiff->max_buf_size * ABS (aiff->segment.rate));
- if (desired >= aiff->bytes_per_sample && aiff->bytes_per_sample > 0)
+ if (desired >= aiff->bytes_per_sample)
desired -= (desired % aiff->bytes_per_sample);
GST_LOG_OBJECT (aiff, "Fetching %" G_GINT64_FORMAT " bytes of data "