# HG changeset patch # User reimar # Date 1159107991 0 # Node ID 5928bd5c7f0bf4de21ba584b2614d8280ae6e1ee # Parent 8ae8ee9512840c74d9aa753e5d0c13726cda0b17 Make fill_buffer function check for stream eof, fixes hang at eof (bug #580) diff -r 8ae8ee951284 -r 5928bd5c7f0b libmpdemux/demux_real.c --- 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);