diff src/vorbis/vorbis.c @ 540:62c4c304a997 trunk

[svn] - handle OV_HOLE gracefully
author nenolod
date Tue, 23 Jan 2007 06:25:58 -0800
parents f17fb87c0288
children e045af8665c6
line wrap: on
line diff
--- a/src/vorbis/vorbis.c	Tue Jan 23 06:24:14 2007 -0800
+++ b/src/vorbis/vorbis.c	Tue Jan 23 06:25:58 2007 -0800
@@ -363,10 +363,12 @@
                                               pcmout, rg_scale);
     }
     else {
-        bytes =
-            ov_read(&vf, pcmout, sizeof(pcmout),
-                    (int) (G_BYTE_ORDER == G_BIG_ENDIAN),
-                    2, 1, &current_section);
+        do {
+            bytes =
+                ov_read(&vf, pcmout, sizeof(pcmout),
+                        (int) (G_BYTE_ORDER == G_BIG_ENDIAN),
+                         2, 1, &current_section);
+	} while (bytes == OV_HOLE);
     }
 
     /*