mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 16:48:11 +00:00
gst/wavparse/gstwavparse.c: Fix block alignment calculation. Alignment should be done before adding the byte offset w...
Original commit message from CVS: Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com> * 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).
This commit is contained in:
parent
d2d26594f9
commit
0465903a85
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2006-03-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
|
||||||
|
|
||||||
|
* 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 <thaytan@mad.scientist.com>
|
2006-03-20 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/matroska/ebml-write.c: (gst_ebml_write_element_push):
|
* gst/matroska/ebml-write.c: (gst_ebml_write_element_push):
|
||||||
|
|
|
@ -792,15 +792,15 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
|
||||||
if (cur_type != GST_SEEK_TYPE_NONE) {
|
if (cur_type != GST_SEEK_TYPE_NONE) {
|
||||||
wav->offset =
|
wav->offset =
|
||||||
gst_util_uint64_scale_int (seeksegment.last_stop, wav->bps, GST_SECOND);
|
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->offset % wav->bytes_per_sample;
|
||||||
|
wav->offset += wav->datastart;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stop != -1) {
|
if (stop != -1) {
|
||||||
wav->end_offset = gst_util_uint64_scale_int (stop, wav->bps, GST_SECOND);
|
wav->end_offset = gst_util_uint64_scale_int (stop, wav->bps, GST_SECOND);
|
||||||
wav->end_offset += wav->datastart;
|
|
||||||
wav->end_offset +=
|
wav->end_offset +=
|
||||||
wav->bytes_per_sample - (wav->end_offset % wav->bytes_per_sample);
|
wav->bytes_per_sample - (wav->end_offset % wav->bytes_per_sample);
|
||||||
|
wav->end_offset += wav->datastart;
|
||||||
} else {
|
} else {
|
||||||
wav->end_offset = wav->datasize + wav->datastart;
|
wav->end_offset = wav->datasize + wav->datastart;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue