diff options
author | jep <jep@2b0047a9-a6d8-0310-accf-f7200b2a168c> | 2014-09-18 09:31:28 +0000 |
---|---|---|
committer | jep <jep@2b0047a9-a6d8-0310-accf-f7200b2a168c> | 2014-09-18 09:31:28 +0000 |
commit | a0a817ee6afa62f00f90c048920e822c0e54bdf7 (patch) | |
tree | eebf1515badd7a69d2bb06896d08b16a5be97e85 | |
parent | f38d8454864ce28100e294c996d32359facf1eb6 (diff) |
* configure.ac: drop missed reference to liboil.
* src/mp3-ipp.c: (ipp_decode_mp3):
* src/mp3tl.c: (mp3tl_decode_frame):
Ensure to consume data from our bitreader when there's a bad frame.
Fixes random not negotiatied and noise issues after a seek.
git-svn-id: https://core.fluendo.com/gstreamer/svn/trunk/gst-fluendo-mp3@2629 2b0047a9-a6d8-0310-accf-f7200b2a168c
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | src/mp3-ipp.c | 8 | ||||
-rw-r--r-- | src/mp3tl.c | 5 |
4 files changed, 22 insertions, 10 deletions
@@ -1,3 +1,11 @@ +2014-09-18 Josep Torra <josep@fluendo.com> + + * configure.ac: drop missed reference to liboil. + * src/mp3-ipp.c: (ipp_decode_mp3): + * src/mp3tl.c: (mp3tl_decode_frame): + Ensure to consume data from our bitreader when there's a bad frame. + Fixes random not negotiatied and noise issues after a seek. + 2014-08-29 Julien Moutte <julien@fluendo.com> * src/mp3-c.c: (c_decode_mp3): When no previous frame is usable for diff --git a/configure.ac b/configure.ac index d9f3011..13f547c 100644 --- a/configure.ac +++ b/configure.ac @@ -136,14 +136,9 @@ $PACKAGE-$VERSION Use Intel Performance Primitives: ${HAVE_IPP} IPP CFLAGS: ${IPP_INCLUDES} - IPP LDFLAGS: ${IPP_LIBS} -" -if test "x$HAVE_IPP" = "xtrue"; then -echo " Use Liboil: disabled by IPP" -else -echo " Use Liboil: ${HAVE_LIBOIL}" -fi -echo -n " + IPP LDFLAGS: ${IPP_LIBS} + CPU_TUNE_CFLAGS: ${CPU_TUNE_CFLAGS} CPU_TUNE_LDFLAGS: ${CPU_TUNE_LDFLAGS} + " diff --git a/src/mp3-ipp.c b/src/mp3-ipp.c index 83653aa..969aa79 100644 --- a/src/mp3-ipp.c +++ b/src/mp3-ipp.c @@ -127,6 +127,10 @@ ipp_decode_mp3 (mp3tl * tl) /* Verify that sufficient main_data was extracted from */ /* the previous sync interval */ MainDataOK = ((*MainDataEnd - MainDataBegin) >= 0); + if (!MainDataOK) { + GST_DEBUG ("MainDataEnd: %d MainDataBegin: %d delta: %d", + *MainDataEnd, MainDataBegin, *MainDataEnd - MainDataBegin); + } /* If so, copy the main data left over from previous sync interval */ /* to start of main_data buffer. Note that MainDataBegin is the negative */ @@ -144,8 +148,8 @@ ipp_decode_mp3 (mp3tl * tl) for (nSlots = hdr->main_slots; nSlots > 0; nSlots--) MainDataBuf[(*MainDataEnd)++] = bs_getbits (tl->bs, 8); #else - bs_getbytes (tl->bs, MainDataBuf + tl->ipp.MainDataEnd, hdr->main_slots); - tl->ipp.MainDataEnd += hdr->main_slots; + bs_getbytes (tl->bs, MainDataBuf + *MainDataEnd, hdr->main_slots); + *MainDataEnd += hdr->main_slots; #endif if (!MainDataOK) { diff --git a/src/mp3tl.c b/src/mp3tl.c index 1fe62dc..88ab008 100644 --- a/src/mp3tl.c +++ b/src/mp3tl.c @@ -563,6 +563,11 @@ mp3tl_decode_frame (mp3tl * tl, guint8 * samples, guint bufsize) #else ret = c_decode_mp3 (tl); #endif + if (ret == MP3TL_ERR_BAD_FRAME) { + /* Consume the data from our bitreader */ + bs_consume (tl->bs, hdr->frame_bits - (SYNC_WORD_LNGTH + HEADER_LNGTH)); + return ret; + } if (ret != MP3TL_ERR_OK) return ret; |