X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fenclame.c;h=491365136279b1514ce93cfab99f2b0000e474ab;hb=ba2864fb60482a5bacb552d17c538b0ed5303a4a;hp=f663e62eba77f813796585adca6461b8f7631927;hpb=52d45181a7d1df6016d32c1842622660224538e0;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/enclame.c b/libhb/enclame.c index f663e62e..49136513 100644 --- a/libhb/enclame.c +++ b/libhb/enclame.c @@ -68,6 +68,13 @@ int enclameInit( hb_work_object_t * w, hb_job_t * job ) **********************************************************************/ void enclameClose( hb_work_object_t * w ) { + hb_work_private_t * pv = w->private_data; + + lame_close( pv->lame ); + hb_list_empty( &pv->list ); + free( pv->buf ); + free( pv ); + w->private_data = NULL; } /*********************************************************************** @@ -80,8 +87,8 @@ static hb_buffer_t * Encode( hb_work_object_t * w ) hb_work_private_t * pv = w->private_data; hb_buffer_t * buf; int16_t samples_s16[1152 * 2]; - uint64_t pts; - int pos, i; + uint64_t pts, pos; + int i; if( hb_list_bytes( pv->list ) < pv->input_samples * sizeof( float ) ) { @@ -101,7 +108,7 @@ static hb_buffer_t * Encode( hb_work_object_t * w ) buf->stop = buf->start + 90000 * 1152 / pv->job->arate; buf->size = lame_encode_buffer_interleaved( pv->lame, samples_s16, 1152, buf->data, LAME_MAXMP3BUFFER ); - buf->key = 1; + buf->frametype = HB_FRAME_AUDIO; if( !buf->size ) {