asfdemux: fix a seek failure due to out-of-range in push mode
authorCliff Han <cliff.han@lge.com>
Mon, 20 Apr 2015 05:35:30 +0000 (14:35 +0900)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 20 Apr 2015 08:13:24 +0000 (09:13 +0100)
A seek in push mode failed for big offsets which are beyond
the range of guint32.

https://bugzilla.gnome.org/show_bug.cgi?id=748162

gst/asfdemux/gstasfdemux.c

index 4b323c1..ecbec39 100644 (file)
@@ -592,7 +592,7 @@ gst_asf_demux_handle_seek_push (GstASFDemux * demux, GstEvent * event)
 
   GST_DEBUG_OBJECT (demux, "seeking to packet %d", packet);
 
-  cur = demux->data_offset + (packet * demux->packet_size);
+  cur = demux->data_offset + ((guint64) packet * demux->packet_size);
 
   GST_DEBUG_OBJECT (demux, "Pushing BYTE seek rate %g, "
       "start %" G_GINT64_FORMAT ", stop %" G_GINT64_FORMAT, rate, cur, stop);