shithub: sox

Download patch

ref: 40da70e5f545fa977c0c20da9dfabc86b2934bd5
parent: 2e02e5c7d0508039ff116c574733a44426fcd1b9
author: cbagwell <cbagwell>
date: Sun Sep 19 11:22:17 EDT 2004

Return failure for file handlers that don't support seeking.

--- a/src/misc.c
+++ b/src/misc.c
@@ -304,7 +304,7 @@
 /* dummy format routines for do-nothing functions */
 int st_format_nothing(ft_t ft) { return(ST_SUCCESS); }
 st_ssize_t st_format_nothing_io(ft_t ft, st_sample_t *buf, st_ssize_t len) { return(0); }
-int st_format_nothing_seek(ft_t ft, st_size_t offset) { return(ST_SUCCESS); }
+int st_format_nothing_seek(ft_t ft, st_size_t offset) { st_fail_errno(ft, ST_ENOTSUP, "operation not supported"); return(ST_EOF); }
 
 /* dummy effect routine for do-nothing functions */
 int st_effect_nothing(eff_t effp) { return(ST_SUCCESS); }