diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-01-06 13:56:26 +0100 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-01-06 14:03:41 +0100 |
commit | 66545eb7a21821b3ff8d985e200d9138026bc5dc (patch) | |
tree | ffb5b388358b58f9fe6b25f9ac8af384da4999a0 | |
parent | 73d5ae1107d2ecf5d977a7f06e077b1ffefa2ac6 (diff) |
oggdemux: reset header packet count at bos page
-rw-r--r-- | ext/ogg/gstoggdemux.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 3b300846..2c20d502 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -693,6 +693,13 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet) pad->current_granule = granule; } + /* restart header packet count when seeing a b_o_s page; + * particularly useful following a seek or even following chain finding */ + if (packet->b_o_s) { + GST_DEBUG_OBJECT (ogg, "b_o_s packet, resetting header packet count"); + pad->map.n_header_packets_seen = 0; + } + /* Overload the value of b_o_s in ogg_packet with a flag whether or * not this is a header packet. Maybe some day this could be cleaned * up. */ @@ -729,6 +736,7 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet) } } else { pad->map.n_header_packets_seen++; + GST_DEBUG ("header packet %d", pad->map.n_header_packets_seen); } /* we know the start_time of the pad data, see if we |