OSDN Git Service

This patch from superdump lets muxmp4.c set a Height Ratio for the QuickTime transfor...
[handbrake-jp/handbrake-jp-git.git] / libhb / enclame.c
index f663e62..4913651 100644 (file)
@@ -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 )
     {