GNOME Bugzilla – Bug 687927
xingmux: doesn't compute the right number of frames
Last modified: 2012-11-16 23:44:20 UTC
Created attachment 228479 [details] [review] patch As reported here: https://bugs.launchpad.net/soundconverter/+bug/1075497 The xing header frames count in mp3 generated with gstreamer's xingmux always have two frames missing. After a verification of the xingmux code, I propose a small fix: First, the xing header frame is never added to the count, we have to increment the count. Secondly, there is a rounding error when calculating the frame duration, as spf*GST_SECOND/rate is not an integer (26122448.9) an it must be 26122449.
commit cf3e901996ab885d2556029564f956c9bca75a2e Author: Gautier Portet <kassoulet@gmail.com> Date: Fri Nov 9 11:33:40 2012 +0100 xingmux: Properly calculate the number of frames First, the xing header frame is never added to the count, we have to increment the count. Secondly, there is a rounding error when calculating the frame duration, as spf*GST_SECOND/rate is not an integer (26122448.9) an it must be 26122449.
Looks like this made the unit test unhappy: elements/xingmux.c:125:F:general:test_xing_remux:0: Assertion 'memcmp (test_xing, map.data, map.size) == 0' failed
commit 2b3b7ea810a16c76427451d7d76ba5b4fc6e8dd4 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Fri Nov 16 13:32:00 2012 +0100 xingmux: Fix unit test after change to correctly calculate number of frames