summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/demuxers/demux_mpgaudio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index 36ffcfb11..47b49d4de 100644
--- a/src/demuxers/demux_mpgaudio.c
+++ b/src/demuxers/demux_mpgaudio.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_mpgaudio.c,v 1.139 2004/12/16 13:59:11 mroi Exp $
+ * $Id: demux_mpgaudio.c,v 1.140 2005/02/07 18:47:12 tmattern Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -603,6 +603,8 @@ static int demux_mpgaudio_read_head(input_plugin_t *input, uint8_t *buf) {
int bs = 0;
int i, optional;
+ memset(buf, 0, 4);
+
if(!input)
return 0;
@@ -615,7 +617,8 @@ static int demux_mpgaudio_read_head(input_plugin_t *input, uint8_t *buf) {
if(!bs)
bs = MAX_PREVIEW_SIZE;
- input->read(input, buf, bs);
+ if (input->read(input, buf, bs) < 4)
+ return 0;
lprintf("stream is seekable\n");