mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 12:55:53 +00:00
ext/flac/gstflacdec.c: Set duration on output buffers. Fix logic mistake. (bug #144866)
Original commit message from CVS: * ext/flac/gstflacdec.c: (gst_flacdec_write): Set duration on output buffers. Fix logic mistake. (bug #144866)
This commit is contained in:
parent
0e2359f0c9
commit
d3ad860293
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-07-02 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* ext/flac/gstflacdec.c: (gst_flacdec_write): Set duration on
|
||||||
|
output buffers. Fix logic mistake. (bug #144866)
|
||||||
|
|
||||||
2004-07-02 David Schleef <ds@schleef.org>
|
2004-07-02 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst-libs/gst/xoverlay/Makefile.am: xoverlay no longer depends
|
* gst-libs/gst/xoverlay/Makefile.am: xoverlay no longer depends
|
||||||
|
|
|
@ -170,7 +170,7 @@ gst_flacdec_class_init (FlacDecClass * klass)
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
gobject_class->dispose = gst_flacdec_dispose;
|
gobject_class->dispose = gst_flacdec_dispose;
|
||||||
|
|
||||||
gstelement_class->change_state = gst_flacdec_change_state;
|
gstelement_class->change_state = gst_flacdec_change_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder * decoder,
|
||||||
|
|
||||||
flacdec->need_discont = FALSE;
|
flacdec->need_discont = FALSE;
|
||||||
|
|
||||||
if (!GST_PAD_CAPS (flacdec->srcpad)) {
|
if (GST_PAD_CAPS (flacdec->srcpad)) {
|
||||||
if (flacdec->seek_pending) {
|
if (flacdec->seek_pending) {
|
||||||
flacdec->total_samples = flacdec->seek_value;
|
flacdec->total_samples = flacdec->seek_value;
|
||||||
}
|
}
|
||||||
|
@ -511,6 +511,8 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder * decoder,
|
||||||
GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (outbuf));
|
GST_BUFFER_DATA (outbuf) = g_malloc (GST_BUFFER_SIZE (outbuf));
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) =
|
GST_BUFFER_TIMESTAMP (outbuf) =
|
||||||
flacdec->total_samples * GST_SECOND / frame->header.sample_rate;
|
flacdec->total_samples * GST_SECOND / frame->header.sample_rate;
|
||||||
|
GST_BUFFER_DURATION (outbuf) =
|
||||||
|
samples * GST_SECOND / frame->header.sample_rate;
|
||||||
|
|
||||||
if (depth == 8) {
|
if (depth == 8) {
|
||||||
guint8 *outbuffer = (guint8 *) GST_BUFFER_DATA (outbuf);
|
guint8 *outbuffer = (guint8 *) GST_BUFFER_DATA (outbuf);
|
||||||
|
|
Loading…
Reference in a new issue