[Ffmpeg-devel] [PATCH] read multiple frames in ac3_probe

Justin Ruggles justinruggles
Sun Mar 18 00:39:45 CET 2007


Hello,

Here is a patch to make ac3_probe() work like mp3_read_probe().  It
reads as many frames as are in the probe buffer and scores based on how
many valid frames are found at the start of the buffer and overall.

The one thing I don't like so much is that it must call ac3_common_init.
 So for AC-3 decoding or encoding, it means that function will get
called at least 3 times: probe, parse, decode/encode.  It might be worth
it to go back to hardcoding that AC-3 framesize table to avoid this.
What do you think?

Also, this requires that libavcodec/ac3.o be compiled, which is only
done if either the AC-3 parser or encoder (or future decoder) are
enabled.  I don't see any other demuxers which include a libavcodec .o
dependancy in the Makefile.  Can this be done?  If not, should ac3.o be
added to the lavc 'always compile' list?

-Justin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg-ac3_probe-multiple_frames.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070317/21ecd36c/attachment.asc>



More information about the ffmpeg-devel mailing list