summaryrefslogtreecommitdiffstats
path: root/libhb/declpcm.c
diff options
context:
space:
mode:
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;
}