mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
Small fixes
Original commit message from CVS: Small fixes
This commit is contained in:
parent
cc76e0aacd
commit
58b9fad950
1 changed files with 12 additions and 10 deletions
|
@ -418,21 +418,25 @@ gst_vorbisfile_loop (GstElement *element)
|
|||
if (vorbisfile->need_discont) {
|
||||
GstEvent *discont;
|
||||
|
||||
vorbisfile->need_discont = FALSE;
|
||||
|
||||
if (GST_PAD_IS_USABLE (vorbisfile->srcpad)) {
|
||||
/* get stream stats */
|
||||
samples = (gint64) (ov_pcm_tell (&vorbisfile->vf));
|
||||
|
||||
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, time,
|
||||
GST_FORMAT_UNITS, samples, NULL);
|
||||
|
||||
vorbisfile->need_discont = FALSE;
|
||||
gst_pad_push (vorbisfile->srcpad, GST_BUFFER (discont));
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
GST_DEBUG (0, "eos");
|
||||
//ov_clear (&vorbisfile->vf);
|
||||
vorbisfile->restart = TRUE;
|
||||
gst_buffer_unref (outbuf);
|
||||
if (GST_PAD_IS_USABLE (vorbisfile->srcpad))
|
||||
gst_pad_push (vorbisfile->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
|
||||
gst_element_set_eos (element);
|
||||
return;
|
||||
|
@ -469,14 +473,12 @@ gst_vorbisfile_loop (GstElement *element)
|
|||
vorbisfile->total_bytes += GST_BUFFER_SIZE (outbuf);
|
||||
}
|
||||
|
||||
if (GST_PAD_IS_USABLE (vorbisfile->srcpad)) {
|
||||
if (GST_PAD_IS_USABLE (vorbisfile->srcpad))
|
||||
gst_pad_push (vorbisfile->srcpad, outbuf);
|
||||
}
|
||||
else {
|
||||
else
|
||||
gst_buffer_unref (outbuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const GstFormat*
|
||||
gst_vorbisfile_get_formats (GstPad *pad)
|
||||
|
|
Loading…
Reference in a new issue