mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-03 16:09:39 +00:00
ext/speex/gstspeexenc.c: Fix speex timestamps so that it gets muxed properly.
Original commit message from CVS: * ext/speex/gstspeexenc.c: (gst_speexenc_class_init), (gst_speexenc_chain): Fix speex timestamps so that it gets muxed properly.
This commit is contained in:
parent
fe83f4c817
commit
a98a98b5f3
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-10-15 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/speex/gstspeexenc.c: (gst_speexenc_class_init),
|
||||
(gst_speexenc_chain):
|
||||
Fix speex timestamps so that it gets muxed properly.
|
||||
|
||||
2004-10-15 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_get_type),
|
||||
|
|
|
@ -196,7 +196,7 @@ gst_speexenc_class_init (GstSpeexEncClass * klass)
|
|||
0.0, 10.0, DEFAULT_QUALITY, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BITRATE,
|
||||
g_param_spec_int ("bitrate", "Encoding Bit-rate",
|
||||
"Specify an encoding bit-rate (in bps). ",
|
||||
"Specify an encoding bit-rate (in bps). (0 = automatic)",
|
||||
0, G_MAXINT, DEFAULT_BITRATE, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_VBR,
|
||||
g_param_spec_boolean ("vbr", "VBR",
|
||||
|
@ -952,6 +952,10 @@ gst_speexenc_chain (GstPad * pad, GstData * _data)
|
|||
g_assert (written == outsize);
|
||||
speex_bits_reset (&speexenc->bits);
|
||||
|
||||
GST_BUFFER_TIMESTAMP (outbuf) =
|
||||
(speexenc->frameno * frame_size -
|
||||
speexenc->lookahead) * GST_SECOND / speexenc->rate;
|
||||
GST_BUFFER_DURATION (outbuf) = frame_size * GST_SECOND / speexenc->rate;
|
||||
GST_BUFFER_OFFSET (outbuf) = speexenc->bytes_out;
|
||||
GST_BUFFER_OFFSET_END (outbuf) =
|
||||
speexenc->frameno * frame_size - speexenc->lookahead;
|
||||
|
|
Loading…
Reference in a new issue