From b3cc87185a458b044ed42bb25baa6167dcd5d3ba Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 9 Dec 2008 17:21:37 +0000 Subject: [PATCH] gst-libs/gst/riff/riff-read.c: Fix handling of odd chunks in riff metadata. Original commit message from CVS: * gst-libs/gst/riff/riff-read.c: Fix handling of odd chunks in riff metadata. --- ChangeLog | 5 +++++ gst-libs/gst/riff/riff-read.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7f0dfea..b627288 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-09 Stefan Kost + + * gst-libs/gst/riff/riff-read.c: + Fix handling of odd chunks in riff metadata. + 2008-12-08 Wim Taymans * gst/volume/gstvolume.c: (gst_volume_class_init), diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c index dc29cf3..b39ba2c 100644 --- a/gst-libs/gst/riff/riff-read.c +++ b/gst-libs/gst/riff/riff-read.c @@ -614,6 +614,10 @@ gst_riff_parse_info (GstElement * element, tsize = GST_READ_UINT32_LE (data + 4); size -= 8; data += 8; + + GST_DEBUG ("tag %" GST_FOURCC_FORMAT ", size %u", + GST_FOURCC_ARGS (tag), tsize); + if (tsize > size) { GST_WARNING_OBJECT (element, "Tagsize %d is larger than available data %d", tsize, size); @@ -715,6 +719,9 @@ gst_riff_parse_info (GstElement * element, } } + if (tsize & 1) + tsize++; + data += tsize; size -= tsize; } -- 2.7.4