ext/ogg/gstoggmux.c: Make sure we never send -1 granulepos.

Original commit message from CVS:
* 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.
This commit is contained in:
Wim Taymans 2004-08-22 09:31:06 +00:00
parent bbefa5c897
commit 37782e28dc
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-08-22 Wim Taymans <wim@fluendo.com>
* 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 <wim@fluendo.com>
* ext/ogg/gstoggmux.c: (gst_ogg_mux_next_buffer),

View file

@ -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++;