changeset 143:35e3ced6cfd9 libavcodec

* fixed decoding busy loop
author kabi
date Wed, 31 Oct 2001 19:40:53 +0000
parents da4c751fc151
children cb5dabd00ba2
files mpegaudiodec.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Wed Oct 31 18:29:03 2001 +0000
+++ b/mpegaudiodec.c	Wed Oct 31 19:40:53 2001 +0000
@@ -2270,7 +2270,7 @@
 	    len = HEADER_SIZE - len;
 	    if (len > buf_size)
 		len = buf_size;
-	    else if (len > 0) {
+	    if (len > 0) {
 		memcpy(s->inbuf_ptr, buf_ptr, len);
 		buf_ptr += len;
 		buf_size -= len;
@@ -2280,6 +2280,7 @@
             got_header:
 		header = (s->inbuf[0] << 24) | (s->inbuf[1] << 16) |
 		    (s->inbuf[2] << 8) | s->inbuf[3];
+
 		if (check_header(header) < 0) {
 		    /* no sync found : move by one byte (inefficient, but simple!) */
 		    memcpy(s->inbuf, s->inbuf + 1, s->inbuf_ptr - s->inbuf - 1);