mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
ext/ogg/gstoggdemux.c: Initialise segment_stop to GST_CLOCK_TIME_NONE when creating a new chain; should fix live stre...
Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_pad_internal_chain), (gst_ogg_pad_submit_packet), (gst_ogg_chain_new): Initialise segment_stop to GST_CLOCK_TIME_NONE when creating a new chain; should fix live streaming. Also add more debug output and fix a typo.
This commit is contained in:
parent
e4493ada68
commit
abda2cc1b8
2 changed files with 28 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2005-11-08 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_internal_chain),
|
||||||
|
(gst_ogg_pad_submit_packet), (gst_ogg_chain_new):
|
||||||
|
Initialise segment_stop to GST_CLOCK_TIME_NONE when
|
||||||
|
creating a new chain; should fix live streaming. Also
|
||||||
|
add more debug output and fix a typo.
|
||||||
|
|
||||||
2005-11-08 Brian Cameron <brian dot cameron at sun dot com>
|
2005-11-08 Brian Cameron <brian dot cameron at sun dot com>
|
||||||
|
|
||||||
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
|
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
|
@ -571,7 +571,8 @@ gst_ogg_pad_internal_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
ogg = GST_OGG_DEMUX (oggpad->ogg);
|
ogg = GST_OGG_DEMUX (oggpad->ogg);
|
||||||
|
|
||||||
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||||
GST_DEBUG_OBJECT (oggpad, "received buffer from iternal pad, TS=%lld",
|
GST_DEBUG_OBJECT (oggpad, "received buffer from internal pad, TS=%"
|
||||||
|
GST_TIME_FORMAT "=%" G_GINT64_FORMAT, GST_TIME_ARGS (timestamp),
|
||||||
timestamp);
|
timestamp);
|
||||||
|
|
||||||
if (oggpad->start_time == GST_CLOCK_TIME_NONE) {
|
if (oggpad->start_time == GST_CLOCK_TIME_NONE) {
|
||||||
|
@ -829,14 +830,30 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet)
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
GstClockTime segment_start, segment_stop;
|
GstClockTime segment_start, segment_stop;
|
||||||
|
|
||||||
|
GST_DEBUG ("chain->begin_time: %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (chain->begin_time));
|
||||||
|
GST_DEBUG ("chain->segment_start: %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (chain->segment_start));
|
||||||
|
GST_DEBUG ("chain->segment_stop: %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (chain->segment_stop));
|
||||||
|
|
||||||
if (chain->begin_time != GST_CLOCK_TIME_NONE) {
|
if (chain->begin_time != GST_CLOCK_TIME_NONE) {
|
||||||
segment_start = chain->segment_start - chain->begin_time;
|
segment_start = chain->segment_start - chain->begin_time;
|
||||||
segment_stop = chain->segment_stop - chain->begin_time;
|
if (chain->segment_stop != GST_CLOCK_TIME_NONE) {
|
||||||
|
segment_stop = chain->segment_stop - chain->begin_time;
|
||||||
|
} else {
|
||||||
|
segment_stop = GST_CLOCK_TIME_NONE;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
segment_start = chain->segment_start;
|
segment_start = chain->segment_start;
|
||||||
segment_stop = chain->segment_stop;
|
segment_stop = chain->segment_stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_DEBUG ("segment_start: %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (segment_start));
|
||||||
|
GST_DEBUG ("segment_stop: %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (segment_stop));
|
||||||
|
|
||||||
/* create the discont event we are going to send out */
|
/* create the discont event we are going to send out */
|
||||||
event = gst_event_new_newsegment (FALSE, ogg->segment_rate,
|
event = gst_event_new_newsegment (FALSE, ogg->segment_rate,
|
||||||
GST_FORMAT_TIME, segment_start, segment_stop, 0);
|
GST_FORMAT_TIME, segment_start, segment_stop, 0);
|
||||||
|
@ -934,6 +951,7 @@ gst_ogg_chain_new (GstOggDemux * ogg)
|
||||||
chain->streams = g_array_new (FALSE, TRUE, sizeof (GstOggPad *));
|
chain->streams = g_array_new (FALSE, TRUE, sizeof (GstOggPad *));
|
||||||
chain->begin_time = GST_CLOCK_TIME_NONE;
|
chain->begin_time = GST_CLOCK_TIME_NONE;
|
||||||
chain->segment_start = GST_CLOCK_TIME_NONE;
|
chain->segment_start = GST_CLOCK_TIME_NONE;
|
||||||
|
chain->segment_stop = GST_CLOCK_TIME_NONE;
|
||||||
chain->total_time = GST_CLOCK_TIME_NONE;
|
chain->total_time = GST_CLOCK_TIME_NONE;
|
||||||
|
|
||||||
return chain;
|
return chain;
|
||||||
|
|
Loading…
Reference in a new issue