diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-01-23 22:09:45 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-01-23 22:10:09 +0100 |
commit | a66ce94adcf337dfcc6c9c3845c1c2ad8a8d6d8f (patch) | |
tree | 980f355f950214a0ba67413a66d82e625af55759 | |
parent | b38dcf5277f28e12b5b9bb1e554de78282ebb2f3 (diff) |
oggdemux: Correctly set DELTA_UNIT flag for OGM streams
-rw-r--r-- | ext/ogg/gstoggdemux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 0b60b405..936585d2 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -483,6 +483,7 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet) gint offset; GstClockTime out_timestamp, out_duration; guint64 out_offset, out_offset_end; + gboolean delta_unit = FALSE; GST_DEBUG_OBJECT (ogg, "%p streaming to peer serial %08x", pad, pad->map.serialno); @@ -530,6 +531,7 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet) } offset = 1 + (((data[0] & 0xc0) >> 6) | ((data[0] & 0x02) << 1)); + delta_unit = (((data[0] & 0x08) >> 3) == 0); } else { offset = 0; } @@ -604,6 +606,10 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet) if (ret != GST_FLOW_OK) goto no_buffer; + /* set delta flag for OGM content */ + if (delta_unit) + GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT); + /* copy packet in buffer */ memcpy (buf->data, packet->packet + offset, packet->bytes - offset); |