[MPlayer-dev-eng] Variable-Length Audio Chunks

Arpi arpi at thot.banki.hu
Tue Jan 1 19:50:56 CET 2002


Hi,

> Hi team,
> 	I'm working on yet another ADPCM format today (there are a bunch
> of them floating around). This one has data stored in blocks of 0x200
> bytes. However, a particular AVI audio chunk will have 7 or 8 of them
> together, for a chunk size of 0xE00 or 0x1000 bytes. How do I go about
> initializing a buffer for this? Typically, my audio decoders have always
> banked on all of the audio chunks being the same length. Do I want to try
> to determine the maximum length from one of MPlayer's data structures and
> initialize for that? Or can I load and decode the 0x200-byte blocks
> individually and dispatch them each to MPlayer somehow when each is
> finished?

use demux_read_data() with 0x200 block length.
mplayer's demuxer doesn't need to erad whole chunks. it can read fragments
of chunk and even bigger data crossing chunk boundaries.


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu



More information about the MPlayer-dev-eng mailing list