summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-08-29 11:55:26 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-08-29 11:55:26 +0300
commitf5df8af59e73c44d732b1f0bee6f78836e4cd321 (patch)
treea31138bb3cfc01a423daf25819c740503b3e67c7
parentd924f8a9556056f21b6d024d3ee4178178b8c20e (diff)
wavparse: Store size of data tag in a 64 bit integer locally too
Otherwise we will clip the DS64 value of RF64 files to 32 bits again.
-rw-r--r--gst/wavparse/gstwavparse.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 9be8217e8..ef1f90468 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -1260,10 +1260,13 @@ gst_wavparse_stream_headers (GstWavParse * wav)
*/
switch (tag) {
case GST_RIFF_TAG_data:{
+ guint64 size64;
+
GST_DEBUG_OBJECT (wav, "Got 'data' TAG, size : %u", size);
+ size64 = size;
if (wav->ignore_length) {
GST_DEBUG_OBJECT (wav, "Ignoring length");
- size = 0;
+ size64 = 0;
}
if (wav->streaming) {
gst_adapter_flush (wav->adapter, 8);
@@ -1274,27 +1277,27 @@ gst_wavparse_stream_headers (GstWavParse * wav)
wav->offset += 8;
wav->datastart = wav->offset;
/* use size from ds64 chunk if available */
- if (size == -1 && wav->datasize > 0) {
+ if (size64 == -1 && wav->datasize > 0) {
GST_DEBUG_OBJECT (wav, "Using ds64 datasize");
- size = wav->datasize;
+ size64 = wav->datasize;
}
/* If size is zero, then the data chunk probably actually extends to
the end of the file */
- if (size == 0 && upstream_size) {
- size = upstream_size - wav->datastart;
+ if (size64 == 0 && upstream_size) {
+ size64 = upstream_size - wav->datastart;
}
/* Or the file might be truncated */
else if (upstream_size) {
- size = MIN (size, (upstream_size - wav->datastart));
+ size64 = MIN (size64, (upstream_size - wav->datastart));
}
- wav->datasize = (guint64) size;
- wav->dataleft = (guint64) size;
- wav->end_offset = size + wav->datastart;
+ wav->datasize = size64;
+ wav->dataleft = size64;
+ wav->end_offset = size64 + wav->datastart;
if (!wav->streaming) {
/* We will continue parsing tags 'till end */
- wav->offset += size;
+ wav->offset += size64;
}
- GST_DEBUG_OBJECT (wav, "datasize = %u", size);
+ GST_DEBUG_OBJECT (wav, "datasize = %" G_GUINT64_FORMAT, size64);
break;
}
case GST_RIFF_TAG_fact:{