[FFmpeg-devel] Questions about mpegaudio_parse

Michael Niedermayer michaelni
Mon Nov 10 12:07:25 CET 2008

On Mon, Nov 10, 2008 at 11:04:09AM +0200, Yoav Steinberg wrote:
> Hi,
> I've got some questions relating to the mpegaudio_parse() implementation:
> 1) There seems to be logic in place for finding a minimal number of 
> valid and identical frame headers (see header_count) before returning 
> the next valid packet. In case of some inconsistencies this logic skips 
> valid packets until this minimal value is met, so the skipped packets 
> are never handled even if they are perfectly valid.

> 2) What is the rational behind these minimal values (if I get the code 
> correctly it's 3 consecutive identical frame headers)?

isnt svn log/blame pointing to something? no ive not checked, but form what
i remember there where files (not really rare) that had some invalid
stuff at the begin leading to a wrong samplerate being detected.

> 3) Would a patch where skipped packets are buffered and returned in 
> order in case the minimal number of headers is reached be welcome?

yes, if its simple and clean, definitly no if it adds lots of code or
adds memcpy in cases where theres none currently

> 4) There seems to be an ifdefed out mechanism for handling "free 
> format", what is this?

something that does not seem to exists judging from the lack of bugreports

> Would a change as described in 3 require special 
> handling for this case?

as we have no files to test this code i guess its not possible to do much
with it ...

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081110/6c0701d4/attachment.pgp>

More information about the ffmpeg-devel mailing list