>IIRC some of the metadata is only known once all parsing is finished, eg the audio duration, which may be why it's currently done as it is
Y, I completely agree, but I don't think anything is written during the parsing. I _think_ all info is stored in memory during the parse, and then we write to the Metadata object and the ContentHandler after reading through the file. If I understand the code correctly, then it would be trivial to write to the Metadata object before writing to the handler. On Wed, Oct 17, 2018 at 9:48 AM Nick Burch <[email protected]> wrote: > > On Wed, 17 Oct 2018, Tim Allison wrote: > > This is one of the limitations of a streaming write. As I look at > > the code of the MP3Parser, I _think_ it would be trivial to write the > > metadata before writing any content, and it wouldn't get in the way of > > a streaming parse because the parser reads the whole file and caches > > the content as it goes -- only writing once it has finished reading > > the file. > > IIRC some of the metadata is only known once all parsing is finished, eg > the audio duration, which may be why it's currently done as it is > > Nick
