summaryrefslogtreecommitdiffstats
path: root/libhb/enclame.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/enclame.c')
-rw-r--r--libhb/enclame.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/libhb/enclame.c b/libhb/enclame.c
index 000e0cef5..04e6ae6d8 100644
--- a/libhb/enclame.c
+++ b/libhb/enclame.c
@@ -144,14 +144,15 @@ static hb_buffer_t * Encode( hb_work_object_t * w )
}
buf = hb_buffer_init( pv->output_bytes );
- buf->start = pts + 90000 * pos / pv->out_discrete_channels / sizeof( float ) / audio->config.out.samplerate;
- buf->stop = buf->start + 90000 * 1152 / audio->config.out.samplerate;
- pv->pts = buf->stop;
+ buf->s.start = pts + 90000 * pos / pv->out_discrete_channels / sizeof( float ) / audio->config.out.samplerate;
+ buf->s.stop = buf->s.start + 90000 * 1152 / audio->config.out.samplerate;
+ pv->pts = buf->s.stop;
buf->size = lame_encode_buffer_float(
pv->lame, samples[0], samples[1],
1152, buf->data, LAME_MAXMP3BUFFER );
- buf->frametype = HB_FRAME_AUDIO;
+ buf->s.type = AUDIO_BUF;
+ buf->s.frametype = HB_FRAME_AUDIO;
if( !buf->size )
{
@@ -188,9 +189,12 @@ int enclameWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
buf = hb_buffer_init( pv->output_bytes );
buf->size = lame_encode_flush( pv->lame, buf->data, LAME_MAXMP3BUFFER );
- buf->start = pv->pts;
- buf->stop = buf->start + 90000 * 1152 / audio->config.out.samplerate;
- buf->frametype = HB_FRAME_AUDIO;
+ buf->s.start = pv->pts;
+ buf->s.stop = buf->s.start + 90000 * 1152 / audio->config.out.samplerate;
+
+ buf->s.type = AUDIO_BUF;
+ buf->s.frametype = HB_FRAME_AUDIO;
+
if( buf->size <= 0 )
{
hb_buffer_close( &buf );