oggstream: Use proper type for sample calculation
authorEdward Hervey <edward@centricular.com>
Sun, 5 Nov 2017 11:16:13 +0000 (12:16 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Sun, 5 Nov 2017 11:16:13 +0000 (12:16 +0100)
If we are going to return a (potentially) 64bit integer, don't use
a 32bit one for calculation, otherwise we could end up exceeding
the maximum size of a 32bit int.

ext/ogg/gstoggstream.c

index 5da5b7c..b973e29 100644 (file)
@@ -1570,7 +1570,7 @@ static gint64
 packet_duration_ogm (GstOggStream * pad, ogg_packet * packet)
 {
   const guint8 *data;
-  int samples;
+  gint64 samples;
   int offset;
   int n;