summaryrefslogtreecommitdiffstats
path: root/libhb/declpcm.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-08-01 18:06:22 +0000
committerjstebbins <[email protected]>2011-08-01 18:06:22 +0000
commit76d480815a9c6773e0fa5bcffaded04646279b8a (patch)
tree01fb72f321632a8bfb928bb3cfc40448f371eb0c /libhb/declpcm.c
parent7a083edaa1a8d331ca8eb2878f051a4fc1966d43 (diff)
add more audio passthru options
adds aac and mp3 passthru for mp4 and mkv containers adds dts and dtshd for mp4 container (mkv already had it) Note: The only player known (to me) to support dts(hd) in mp4 is ff/avplay In LinGui there is a new option to limit which passthru codecs will be used by the "Auto Passthru" audio codec options. The CLI already has this ability with "--audio_copy-mask" which is use in conjunction with the "copy" audio codec option. Also corrects some A/V sync issues when video frames are dropped due to a gap detected in the audio. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4149 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/declpcm.c')
-rw-r--r--libhb/declpcm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libhb/declpcm.c b/libhb/declpcm.c
index 3dd1f7366..62eb563e8 100644
--- a/libhb/declpcm.c
+++ b/libhb/declpcm.c
@@ -259,6 +259,7 @@ static int declpcmBSInfo( hb_work_object_t *w, const hb_buffer_t *b,
int rate = hdr2samplerate[ ( b->data[4] >> 4 ) & 0x3 ];
int bitrate = rate * sample_size * nchannels;
+ int64_t duration = b->data[0] * 150;
memset( info, 0, sizeof(*info) );
@@ -269,6 +270,7 @@ static int declpcmBSInfo( hb_work_object_t *w, const hb_buffer_t *b,
info->flags = ( b->data[3] << 16 ) | ( b->data[4] << 8 ) | b->data[5];
info->channel_layout = hdr2layout[nchannels - 1];
info->channel_map = &hb_qt_chan_map;
+ info->samples_per_frame = ( duration * rate ) / 90000;
return 1;
}