diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-08-31 15:02:09 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-08-31 15:02:09 +0000 |
commit | a414f86f8854a90c48e96262a9f9d02b4e2a3d84 (patch) | |
tree | c61d58314105eab86474686ff36054e3026e64db /ext/speex/gstspeexenc.c | |
parent | 25896b3a93da2cc7a8b2c5418d874bdb0065c5ef (diff) |
ext/speex/gstspeexenc.c: Correct the timestamp and granulepos calculation by one Speex frame.
Original commit message from CVS:
* ext/speex/gstspeexenc.c: (gst_speex_enc_encode):
Correct the timestamp and granulepos calculation by one Speex
frame.
Diffstat (limited to 'ext/speex/gstspeexenc.c')
-rw-r--r-- | ext/speex/gstspeexenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index b2653b3a..a7059edf 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -908,13 +908,13 @@ gst_speex_enc_encode (GstSpeexEnc * enc, gboolean flush) speex_bits_reset (&enc->bits); GST_BUFFER_TIMESTAMP (outbuf) = enc->start_ts + - gst_util_uint64_scale_int (enc->frameno_out * frame_size - + gst_util_uint64_scale_int ((enc->frameno_out - 1) * frame_size - enc->lookahead, GST_SECOND, enc->rate); GST_BUFFER_DURATION (outbuf) = gst_util_uint64_scale_int (frame_size, GST_SECOND, enc->rate); /* set gp time and granulepos; see gst-plugins-base/ext/ogg/README */ GST_BUFFER_OFFSET_END (outbuf) = enc->granulepos_offset + - ((enc->frameno_out + 1) * frame_size - enc->lookahead); + ((enc->frameno_out) * frame_size - enc->lookahead); GST_BUFFER_OFFSET (outbuf) = gst_util_uint64_scale_int (GST_BUFFER_OFFSET_END (outbuf), GST_SECOND, enc->rate); |