ext/ogg/gstoggmux.c (gst_ogg_mux_dequeue_page): Compare timestamp + duration, not just timestamp -- ogg pages should ...
Original commit message from CVS: 2006-01-30 Andy Wingo <wingo@pobox.com> * ext/ogg/gstoggmux.c (gst_ogg_mux_dequeue_page): Compare timestamp + duration, not just timestamp -- ogg pages should be ordered by stop time. Necessary fix given the change in vorbis timestamps.
This commit is contained in:
parent
f2476d444b
commit
2817c01fdb
@ -1,5 +1,10 @@
|
|||||||
2006-01-30 Andy Wingo <wingo@pobox.com>
|
2006-01-30 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
|
* ext/ogg/gstoggmux.c (gst_ogg_mux_dequeue_page): Compare
|
||||||
|
timestamp + duration, not just timestamp -- ogg pages should be
|
||||||
|
ordered by stop time. Necessary fix given the change in vorbis
|
||||||
|
timestamps.
|
||||||
|
|
||||||
* ext/theora/theoraenc.c (theora_enc_sink_setcaps)
|
* ext/theora/theoraenc.c (theora_enc_sink_setcaps)
|
||||||
(gst_theora_enc_init): Pull the granule shift out of the encoder.
|
(gst_theora_enc_init): Pull the granule shift out of the encoder.
|
||||||
(granulepos_add): New function, handles the messiness of adjusting
|
(granulepos_add): New function, handles the messiness of adjusting
|
||||||
|
@ -571,12 +571,12 @@ gst_ogg_mux_dequeue_page (GstOggMux * mux, GstFlowReturn * flowret)
|
|||||||
if (buf) {
|
if (buf) {
|
||||||
/* if no oldest buffer yet, take this one */
|
/* if no oldest buffer yet, take this one */
|
||||||
if (oldest == GST_CLOCK_TIME_NONE) {
|
if (oldest == GST_CLOCK_TIME_NONE) {
|
||||||
oldest = GST_BUFFER_TIMESTAMP (buf);
|
oldest = GST_BUFFER_TIMESTAMP (buf) + GST_BUFFER_DURATION (buf);
|
||||||
opad = pad;
|
opad = pad;
|
||||||
} else {
|
} else {
|
||||||
/* if we have an oldest, compare with this one */
|
/* if we have an oldest, compare with this one */
|
||||||
if (GST_BUFFER_TIMESTAMP (buf) < oldest) {
|
if (GST_BUFFER_TIMESTAMP (buf) + GST_BUFFER_DURATION (buf) < oldest) {
|
||||||
oldest = GST_BUFFER_TIMESTAMP (buf);
|
oldest = GST_BUFFER_TIMESTAMP (buf) + GST_BUFFER_DURATION (buf);
|
||||||
opad = pad;
|
opad = pad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -588,9 +588,9 @@ gst_ogg_mux_dequeue_page (GstOggMux * mux, GstFlowReturn * flowret)
|
|||||||
g_assert (opad);
|
g_assert (opad);
|
||||||
buf = g_queue_pop_head (opad->pagebuffers);
|
buf = g_queue_pop_head (opad->pagebuffers);
|
||||||
GST_LOG_OBJECT (opad,
|
GST_LOG_OBJECT (opad,
|
||||||
GST_GP_FORMAT " pushing oldest page (time %" GST_TIME_FORMAT ")",
|
GST_GP_FORMAT " pushing oldest page (end time %" GST_TIME_FORMAT ")",
|
||||||
GST_BUFFER_OFFSET_END (buf),
|
GST_BUFFER_OFFSET_END (buf),
|
||||||
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
|
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf) + GST_BUFFER_DURATION (buf)));
|
||||||
*flowret = gst_ogg_mux_push_buffer (mux, buf);
|
*flowret = gst_ogg_mux_push_buffer (mux, buf);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user