opusdec: read gain from the right place in the header
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Tue, 29 May 2012 16:24:02 +0000 (17:24 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Tue, 29 May 2012 16:24:33 +0000 (17:24 +0100)
It's at byte offset 16, not 14.

ext/opus/gstopusdec.c

index 15bec7b421b2d38fe03eb21dd71c6a6145e7f6a9..b0f33ae74677243fb914e5dab629e35fbca738e0 100644 (file)
@@ -277,7 +277,7 @@ gst_opus_dec_parse_header (GstOpusDec * dec, GstBuffer * buf)
 
   dec->n_channels = data[9];
   dec->pre_skip = GST_READ_UINT16_LE (data + 10);
-  dec->r128_gain = GST_READ_UINT16_LE (data + 14);
+  dec->r128_gain = GST_READ_UINT16_LE (data + 16);
   dec->r128_gain_volume = gst_opus_dec_get_r128_volume (dec->r128_gain);
   GST_INFO_OBJECT (dec,
       "Found pre-skip of %u samples, R128 gain %d (volume %f)",