mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
oggdemux: Correctly set DELTA_UNIT flag for OGM streams
This commit is contained in:
parent
b38dcf5277
commit
a66ce94adc
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue