diff options
author | van <[email protected]> | 2008-03-15 07:54:22 +0000 |
---|---|---|
committer | van <[email protected]> | 2008-03-15 07:54:22 +0000 |
commit | cf31c8ed79b120aa0c6e4c7280374dcbfb3b7320 (patch) | |
tree | 8c886e4e8c3d5f7a08345cfac6e55726f846bc66 /libhb/deca52.c | |
parent | 3d3ddb22a51acfdb120deb5e373755f7e90d217e (diff) |
minor bug fix: AC3 passthru audio frames with no pts were getting a bogus start and stop time which caused bad things to happen later on in sync.c. Move up the code that generates a pts for non-passthru frames so that it applies to both.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1340 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deca52.c')
-rw-r--r-- | libhb/deca52.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libhb/deca52.c b/libhb/deca52.c index 593a2bf98..e38ce9c82 100644 --- a/libhb/deca52.c +++ b/libhb/deca52.c @@ -213,6 +213,10 @@ static hb_buffer_t * Decode( hb_work_object_t * w ) /* Get the whole frame */ hb_list_getbytes( pv->list, pv->frame, pv->size, &pts, &pos ); + if (pts == -1) + { + pts = pv->next_expected_pts; + } /* AC3 passthrough: don't decode the AC3 frame */ if( pv->job->acodec & HB_ACODEC_AC3 || @@ -222,6 +226,7 @@ static hb_buffer_t * Decode( hb_work_object_t * w ) memcpy( buf->data, pv->frame, pv->size ); buf->start = pts + ( pos / pv->size ) * 6 * 256 * 90000 / pv->rate; buf->stop = buf->start + 6 * 256 * 90000 / pv->rate; + pv->next_expected_pts = buf->stop; pv->sync = 0; return buf; } @@ -236,10 +241,6 @@ 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 ) ); - if (pts == -1) - { - pts = pv->next_expected_pts; - } buf->start = pts + ( pos / pv->size ) * 6 * 256 * 90000 / pv->rate; buf->stop = buf->start + 6 * 256 * 90000 / pv->rate; |