gst/mpegaudioparse/gstmpegaudioparse.c: Calculate samples per frame correctly for "MPEG 2.5" layer 3.

Original commit message from CVS:
* gst/mpegaudioparse/gstmpegaudioparse.c:
Calculate samples per frame correctly for "MPEG 2.5" layer 3.
Fixes skipping on these files.
This commit is contained in:
Michael Smith 2008-10-14 19:28:05 +00:00
parent ac40f11552
commit 46c5294930
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2008-10-14 Michael Smith <msmith@songbirdnest.com>
* gst/mpegaudioparse/gstmpegaudioparse.c:
Calculate samples per frame correctly for "MPEG 2.5" layer 3.
Fixes skipping on these files.
2008-10-14 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Robin Stocker <robin at nibor dot org>

View file

@ -1349,10 +1349,12 @@ gst_mp3parse_chain (GstPad * pad, GstBuffer * buf)
mp3parse->spf = 384;
else if (mp3parse->layer == 2)
mp3parse->spf = 1152;
else if (mp3parse->version == 2) {
mp3parse->spf = 576;
} else
else if (mp3parse->version == 1) {
mp3parse->spf = 1152;
} else {
/* MPEG-2 or "2.5" */
mp3parse->spf = 576;
}
}
mp3parse->bit_rate = bitrate;