diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-03-31 18:54:46 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-03-31 18:57:13 +0200 |
commit | 564f720c40428e755d0d089b3bb9503d7af93e69 (patch) | |
tree | 1f2387ba359cd311860b6cd7e839e191507f042f | |
parent | 61bc9091894062b97c93ce48375e76bccdbcc082 (diff) |
oggdemux: mark keyframes
Use the mapper to set the delta-unit flag.
-rw-r--r-- | ext/ogg/gstoggdemux.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 162cfc543..7c0bf6e51 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -538,9 +538,11 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, } offset = 0; trim = 0; + delta_unit = !gst_ogg_stream_packet_is_key_frame (&pad->map, packet); } else { offset = 0; trim = 0; + delta_unit = !gst_ogg_stream_packet_is_key_frame (&pad->map, packet); } /* get timing info for the packet */ @@ -576,7 +578,7 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, pad->current_granule); } else if (ogg->segment.rate > 0.0 && pad->current_granule != -1) { pad->current_granule += duration; - if (gst_ogg_stream_packet_is_key_frame (&pad->map, packet)) { + if (!delta_unit) { pad->keyframe_granule = pad->current_granule; } GST_DEBUG_OBJECT (ogg, "interpolating granule %" G_GUINT64_FORMAT, |