From 0465903a85e3865eb064a79d19d1984b4e5da23f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tommi=20My=C3=B6h=C3=A4nen?= Date: Tue, 21 Mar 2006 13:07:31 +0000 Subject: [PATCH] gst/wavparse/gstwavparse.c: Fix block alignment calculation. Alignment should be done before adding the byte offset w... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Original commit message from CVS: Patch by: Tommi Myöhänen * gst/wavparse/gstwavparse.c: (gst_wavparse_perform_seek): Fix block alignment calculation. Alignment should be done before adding the byte offset where the data starts (#335231). --- ChangeLog | 8 ++++++++ gst/wavparse/gstwavparse.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0294cdd1..43d2b7eda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-21 Tim-Philipp Müller + + Patch by: Tommi Myöhänen + + * gst/wavparse/gstwavparse.c: (gst_wavparse_perform_seek): + Fix block alignment calculation. Alignment should be done before + adding the byte offset where the data starts (#335231). + 2006-03-20 Jan Schmidt * gst/matroska/ebml-write.c: (gst_ebml_write_element_push): diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 6ad82ae23..71a0756e6 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -792,15 +792,15 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) if (cur_type != GST_SEEK_TYPE_NONE) { wav->offset = gst_util_uint64_scale_int (seeksegment.last_stop, wav->bps, GST_SECOND); - wav->offset += wav->datastart; wav->offset -= wav->offset % wav->bytes_per_sample; + wav->offset += wav->datastart; } if (stop != -1) { wav->end_offset = gst_util_uint64_scale_int (stop, wav->bps, GST_SECOND); - wav->end_offset += wav->datastart; wav->end_offset += wav->bytes_per_sample - (wav->end_offset % wav->bytes_per_sample); + wav->end_offset += wav->datastart; } else { wav->end_offset = wav->datasize + wav->datastart; } -- 2.34.1