changeset 19960:5928bd5c7f0b

Make fill_buffer function check for stream eof, fixes hang at eof (bug #580)
author reimar
date Sun, 24 Sep 2006 14:26:31 +0000
parents 8ae8ee951284
children 9f011e6892e8
files libmpdemux/demux_real.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_real.c	Sun Sep 24 09:55:18 2006 +0000
+++ b/libmpdemux/demux_real.c	Sun Sep 24 14:26:31 2006 +0000
@@ -569,7 +569,7 @@
     int x, sps, cfs, sph, spc, w;
     int audioreorder_getnextpk = 0;
 
-  while(1){
+  while(!stream_eof(demuxer->stream)){
 
     /* Handle audio/video demxing switch for multirate files (non-interleaved) */
     if (priv->is_multirate && priv->stream_switch) {
@@ -1075,6 +1075,7 @@
 discard:
     stream_skip(demuxer->stream, len);
   }//    goto loop;
+  return 0;
 }
 
 extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);