Commit 658195e6 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h

oggdemux: fix incorrect testing of invalid granpos values

Positive granulepos is valid, -1 granulepos is unset, and all
other negative granulepos are invalid.

Reported by Tim-Philipp Müller
parent 7107e972
......@@ -878,7 +878,7 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet)
granule = gst_ogg_stream_granulepos_to_granule (&pad->map,
packet->granulepos);
if (granule != -1) {
if (granule >= 0) {
GST_DEBUG_OBJECT (ogg, "%p has granulepos %" G_GINT64_FORMAT, pad, granule);
pad->current_granule = granule;
} else if (granule != -1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment