mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
gst/avi/gstavidemux.c: When splitting audio chunks, the block alignment is not taken in consideration, so the smaller...
Original commit message from CVS: Patch by: Fabrizio Gennari <fabrizio dot ge at tiscali dot it> * gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream), (gst_avi_demux_parse_index), (gst_avi_demux_massage_index): When splitting audio chunks, the block alignment is not taken in consideration, so the smaller chunks could be of size which is not a multiple of the block alignment. Fixes #336904
This commit is contained in:
parent
99e0274f14
commit
1ef3722bf6
2 changed files with 18 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2006-04-21 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
Patch by: Fabrizio Gennari <fabrizio dot ge at tiscali dot it>
|
||||
|
||||
* gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream),
|
||||
(gst_avi_demux_parse_index), (gst_avi_demux_massage_index):
|
||||
When splitting audio chunks, the block alignment is not taken in
|
||||
consideration, so the smaller chunks could be of size which is
|
||||
not a multiple of the block alignment. Fixes #336904
|
||||
|
||||
2006-04-21 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_convert):
|
||||
|
|
|
@ -1914,11 +1914,18 @@ gst_avi_demux_massage_index (GstAviDemux * avi,
|
|||
* the allocation of index entries could be improved. */
|
||||
stream = &avi->stream[entry->stream_nr];
|
||||
if (entry->dur > MAX_DURATION && stream->strh->type == GST_RIFF_FCC_auds) {
|
||||
guint32 ideal_size = stream->strf.auds->av_bps / 10;
|
||||
guint32 ideal_size;
|
||||
gst_avi_index_entry *entries;
|
||||
gint old_size, num_added;
|
||||
GList *one2;
|
||||
|
||||
/* cut in 1/10th of a second */
|
||||
ideal_size = stream->strf.auds->av_bps / 10;
|
||||
|
||||
/* ensure chunk size is multiple of blockalign */
|
||||
if (stream->strf.auds->blockalign > 1)
|
||||
ideal_size -= ideal_size % stream->strf.auds->blockalign;
|
||||
|
||||
/* copy index */
|
||||
old_size = entry->size;
|
||||
num_added = (entry->size - 1) / ideal_size;
|
||||
|
|
Loading…
Reference in a new issue