Commit 1ef3722b authored by Fabrizio Gennari's avatar Fabrizio Gennari Committed by Wim Taymans
Browse files

gst/avi/gstavidemux.c: When splitting audio chunks, the block alignment is not...

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
parent 99e0274f
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment