aboutsummaryrefslogtreecommitdiffstats
path: root/examples/alstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/alstream.c')
-rw-r--r--examples/alstream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/alstream.c b/examples/alstream.c
index b561406c..e89481b1 100644
--- a/examples/alstream.c
+++ b/examples/alstream.c
@@ -185,7 +185,7 @@ static int OpenPlayerFile(StreamPlayer *player, const char *filename)
/* If there's an issue getting the chunk or block alignment, load as
* 16-bit and have libsndfile do the conversion.
*/
- if(!iter || sf_get_chunk_size(iter, &inf) != SF_ERR_NO_ERROR)
+ if(!iter || sf_get_chunk_size(iter, &inf) != SF_ERR_NO_ERROR || inf.datalen < 14)
player->sample_type = Int16;
else
{