[Ffmpeg-devel] [PATCH] Add fact chunk to non-PCM wav
Michael Niedermayer
michaelni
Thu Nov 9 11:52:05 CET 2006
Hi
On Thu, Nov 09, 2006 at 11:36:13AM +0100, Michel Bardiaux wrote:
> Michael has reported that
>
> >>interresting, accoridng to microsofts excelent and unambigous
> >>documentation
> >>(not kidding ...)
> >> Fact Chunk
> >>This chunk is required for all WAVE formats other than WAVE_FORMAT_PCM.
> >>It stores file
> >>dependent information about the contents of the WAVE data. It currently
> >>specifies the time length of the
> >>data in samples.
> >>
> >>so this must not be under CODEC_ID_MSGSM, also it must be a seperate patch
> >>as its not CODEC_ID_MSGSM specific
>
> I took this literally, hence CODEC_ID_PCM_ALAW and CODEC_ID_PCM_MULAW
> will get a fact chunk too.
:)
now just take the largest pts minus the smallest pts of any packet stored
and convert that by using AVStream.time_base and AVCodecContext.sample_rate
to the number of samples and store that in the fact chunk
then run the regression tests and send a patch which updates the checksums
>
> Note that get_wav_header does not enforce the rule on input.
thats ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list