ref: cadbe96167bb71c3b105ed2ff8d44b3b1b2b6e9a
parent: 58d9ce79f10730277bb79db6c07d68451c6baacf
author: menno <menno>
date: Sun Dec 22 15:19:24 EST 2002
Bugfix in rvlc, buffer that was not allocated got deallocated
--- a/libfaad/rvlc.c
+++ b/libfaad/rvlc.c
@@ -16,7 +16,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: rvlc.c,v 1.2 2002/12/05 19:28:22 menno Exp $
+** $Id: rvlc.c,v 1.3 2002/12/22 20:19:24 menno Exp $
**/
/* RVLC scalefactor decoding
@@ -133,8 +133,10 @@
if (rvlc_esc_buffer) free(rvlc_esc_buffer);
if (rvlc_sf_buffer) free(rvlc_sf_buffer);
- faad_endbits(&ld_rvlc_sf);
- faad_endbits(&ld_rvlc_esc);
+ if (ics->length_of_rvlc_sf > 0)
+ faad_endbits(&ld_rvlc_sf);
+ if (ics->sf_escapes_present)
+ faad_endbits(&ld_rvlc_esc);
return result;
}