oggpad->new_page = TRUE;
oggpad->first_delta = FALSE;
oggpad->prev_delta = FALSE;
+ oggpad->data_pushed = FALSE;
oggpad->pagebuffers = g_queue_new ();
oggpad->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (newpad);
}
if (GST_BUFFER_IS_DISCONT (buf)) {
- GST_LOG_OBJECT (pad->collect.pad, "got discont");
- packet.packetno++;
- /* No public API for this; hack things in */
- pad->stream.pageno++;
- force_flush = TRUE;
+ if (pad->data_pushed) {
+ GST_LOG_OBJECT (pad->collect.pad, "got discont");
+ packet.packetno++;
+ /* No public API for this; hack things in */
+ pad->stream.pageno++;
+ force_flush = TRUE;
+ } else {
+ GST_LOG_OBJECT (pad->collect.pad, "discont at stream start");
+ }
}
/* flush the currently built page if necessary */
GST_DEBUG_OBJECT (pad->collect.pad, "swapping in BOS packet");
ogg_stream_packetin (&pad->stream, &packet);
+ pad->data_pushed = TRUE;
gp_time = GST_BUFFER_OFFSET (pad->buffer);
granulepos = GST_BUFFER_OFFSET_END (pad->buffer);
oggpad->new_page = TRUE;
oggpad->first_delta = FALSE;
oggpad->prev_delta = FALSE;
+ oggpad->data_pushed = FALSE;
oggpad->pagebuffers = g_queue_new ();
walk = g_slist_next (walk);
gboolean new_page; /* starting a new page */
gboolean first_delta; /* was the first packet in the page a delta */
gboolean prev_delta; /* was the previous buffer a delta frame */
+ gboolean data_pushed; /* whether we pushed data already */
GstPadEventFunction collect_event;