diff options
author | jstebbins <[email protected]> | 2012-05-01 10:05:53 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2012-05-01 10:05:53 +0000 |
commit | 2e8be70b9910c62d8d8cb693f8c58485efbf4e97 (patch) | |
tree | b1bccf23e518790e29948fcf11503b6cf79fc0ae /libhb/deca52.c | |
parent | 4dcf3fcfd9aaeca7fe7ec06ff8c0c6b2d5d3c198 (diff) |
libhb: fix problem with incorrect addition of audio silence
sync needs the precise duration of a frame of audio and has
no way to compute it for passthru audio. So add a duration
member to hb_buffer_t and set it in the audio decoders.
This should eventually supersede hb_buffer_t member "stop"
since it provides redundant information.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4618 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deca52.c')
-rw-r--r-- | libhb/deca52.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libhb/deca52.c b/libhb/deca52.c index 1f05cc829..09eb88101 100644 --- a/libhb/deca52.c +++ b/libhb/deca52.c @@ -265,6 +265,7 @@ static hb_buffer_t * Decode( hb_work_object_t * w ) buf = hb_buffer_init( size ); memcpy( buf->data, pv->frame, size ); buf->s.start = pts; + buf->s.duration = frame_dur; pts += frame_dur; buf->s.stop = pts; pv->next_expected_pts = pts; @@ -289,6 +290,7 @@ static hb_buffer_t * Decode( hb_work_object_t * w ) /* 6 blocks per frame, 256 samples per block, channelsused channels */ buf = hb_buffer_init( 6 * 256 * pv->out_discrete_channels * sizeof( float ) ); buf->s.start = pts; + buf->s.duration = frame_dur; pts += frame_dur; buf->s.stop = pts; pv->next_expected_pts = pts; |