oggdemux: don't do math with invalid granulepos
When the current granulepos is unknown and set to -1, don't try to add durations to it.
This commit is contained in:
parent
96e1c4dbe6
commit
9e222a385c
@ -521,6 +521,7 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet)
|
|||||||
GST_BUFFER_OFFSET (buf) = 0;
|
GST_BUFFER_OFFSET (buf) = 0;
|
||||||
GST_BUFFER_OFFSET_END (buf) = -1;
|
GST_BUFFER_OFFSET_END (buf) = -1;
|
||||||
} else {
|
} else {
|
||||||
|
if (pad->current_granule != -1)
|
||||||
pad->current_granule += duration;
|
pad->current_granule += duration;
|
||||||
if (packet->granulepos != -1) {
|
if (packet->granulepos != -1) {
|
||||||
pad->current_granule = gst_ogg_stream_granulepos_to_granule (&pad->map,
|
pad->current_granule = gst_ogg_stream_granulepos_to_granule (&pad->map,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user