diff options
author | konablend <[email protected]> | 2009-06-17 14:17:08 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-06-17 14:17:08 +0000 |
commit | c8a71b5b873bf738a2675d666885336187042469 (patch) | |
tree | 6a438805982f854c00ddd4458a1867d2d8dfe797 /libhb | |
parent | b41e6db603b5ea2e358aa0d66187a24aebf19f5d (diff) |
- secondary component of r2548: bugfix: libhb passes unaligned stack/heap buffers to ffmpeg.
- use av_malloc() for format-conversion buffer.
- use av_free() instead of free() for av_malloc() buffers.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2549 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/decavcodec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index dae2544c2..2b7ddcbaa 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -233,7 +233,7 @@ static void decavcodecClose( hb_work_object_t * w ) } if ( pv->buffer ) { - free( pv->buffer ); + av_free( pv->buffer ); pv->buffer = NULL; } free( pv ); @@ -339,7 +339,7 @@ static int decavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in, pv->pts_next = cur; - free( bufaligned ); + av_free( bufaligned ); return HB_WORK_OK; } @@ -429,7 +429,7 @@ static int decavcodecBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, } } } - free( buffer ); + av_free( buffer ); av_parser_close( parser ); hb_avcodec_close( context ); return ret; @@ -1160,7 +1160,7 @@ static void decodeAudio( hb_work_private_t *pv, uint8_t *data, int size ) NULL, 0 ); // get output buffer size (in 2-byte samples) then malloc a buffer out_size = ( out_size * 2 ) / isamp; - buffer = malloc( out_size ); + buffer = av_malloc( out_size ); // we're doing straight sample format conversion which behaves as if // there were only one channel. @@ -1194,7 +1194,7 @@ static void decodeAudio( hb_work_private_t *pv, uint8_t *data, int size ) // if we allocated a buffer for sample format conversion, free it if ( buffer != pv->buffer ) { - free( buffer ); + av_free( buffer ); } } } |