diff --git a/ChangeLog b/ChangeLog index e8524f0444..b80d310d56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-08-22 Wim Taymans + + * ext/ogg/gstoggmux.c: (gst_ogg_mux_next_buffer), + (gst_ogg_mux_send_headers), (gst_ogg_mux_loop): + Make sure we never send -1 granulepos. + 2004-08-20 Wim Taymans * ext/ogg/gstoggmux.c: (gst_ogg_mux_next_buffer), diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 15e7e72e0a..7e0d51a4df 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -714,6 +714,8 @@ gst_ogg_mux_send_headers (GstOggMux * mux) packet.packet = GST_BUFFER_DATA (buf); packet.bytes = GST_BUFFER_SIZE (buf); packet.granulepos = GST_BUFFER_OFFSET_END (buf); + if (packet.granulepos == -1) + packet.granulepos = 0; /* mark BOS and packet number */ packet.b_o_s = (pad->packetno == 0); packet.packetno = pad->packetno++; @@ -755,6 +757,8 @@ gst_ogg_mux_send_headers (GstOggMux * mux) packet.packet = GST_BUFFER_DATA (buf); packet.bytes = GST_BUFFER_SIZE (buf); packet.granulepos = GST_BUFFER_OFFSET_END (buf); + if (packet.granulepos == -1) + packet.granulepos = 0; /* mark BOS and packet number */ packet.b_o_s = (pad->packetno == 0); packet.packetno = pad->packetno++; @@ -910,6 +914,8 @@ gst_ogg_mux_loop (GstElement * element) packet.packet = GST_BUFFER_DATA (buf); packet.bytes = GST_BUFFER_SIZE (buf); packet.granulepos = GST_BUFFER_OFFSET_END (buf); + if (packet.granulepos == -1) + packet.granulepos = 0; /* mark BOS and packet number */ packet.b_o_s = (pad->packetno == 0); packet.packetno = pad->packetno++;