summaryrefslogtreecommitdiffstats
path: root/libhb/declpcm.c
diff options
context:
space:
mode:
authortiter <[email protected]>2006-02-23 14:37:47 +0000
committertiter <[email protected]>2006-02-23 14:37:47 +0000
commitd361af3d7e5f914069e0b5ce49a97b9f97faca95 (patch)
tree16579f538531a32b8384f914ac536e8cbb962f0d /libhb/declpcm.c
parentdf70394f44cafec40e756803cb9544757add4e17 (diff)
Softer resampling when audio dates are messed up (fix for LPCM issues).
Disabled verbose in the OS X UI git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@30 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/declpcm.c')
-rw-r--r--libhb/declpcm.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/libhb/declpcm.c b/libhb/declpcm.c
index 59163c366..5b9d5a3b6 100644
--- a/libhb/declpcm.c
+++ b/libhb/declpcm.c
@@ -12,8 +12,6 @@ struct hb_work_object_s
hb_job_t * job;
hb_audio_t * audio;
-
- int64_t pts_last;
};
static int Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
@@ -51,22 +49,11 @@ static int Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
break;
}
- count = ( in->size - 6 ) / 2;
- out = hb_buffer_init( count * sizeof( float ) );
- duration = count * 90000 / samplerate / 2;
- if( w->pts_last > 0 &&
- in->start < w->pts_last + duration / 6 &&
- in->start > w->pts_last - duration / 6 )
- {
- /* Workaround for DVDs where dates aren't exact */
- out->start = w->pts_last;
- }
- else
- {
- out->start = in->start;
- }
+ count = ( in->size - 6 ) / 2;
+ out = hb_buffer_init( count * sizeof( float ) );
+ duration = count * 90000 / samplerate / 2;
+ out->start = in->start;
out->stop = out->start + duration;
- w->pts_last = out->stop;
samples_u8 = in->data + 6;
samples_fl32 = (float *) out->data;
@@ -106,8 +93,6 @@ hb_work_object_t * hb_work_declpcm_init( hb_job_t * job, hb_audio_t * audio )
w->job = job;
w->audio = audio;
- w->pts_last = -1;
-
return w;
}