[FFmpeg-devel] [PATCH] Move av_open_input_file probe loop to its own method
Micah F. Galizia
micahgalizia
Fri Mar 5 04:23:57 CET 2010
Greetings,
In an effort to add a SHOUTcast demuxer (which needs to probe data
offset within a stream and restrict the probe buffer size) I have moved
the probe loop from av_open_input_file into its own method so that it
can be reused. Here are a few differences to the original way things
were probed:
- maximum probe buffer size can be specified as a parameter.
- offset within the stream to probe from can be specified as a parameter.
- instead of seeking back to the start each time a probe fails, stream
data is appenended to the reallocated buffer. This lowers the amount of
data read from the stream (there is no repetition) and results in fewer
closed and reopened streams (when seeking fails).
Thanks in advance, and I look forward to your scathing code reviews :)
--
Micah F. Galizia
micahgalizia at gmail.com
"The mark of an immature man is that he wants to die nobly for a cause,
while the mark of the mature man is that he wants to live humbly for
one." --W. Stekel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: probe_buffer.diff
Type: text/x-diff
Size: 5423 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100304/fc8984b2/attachment.diff>
More information about the ffmpeg-devel
mailing list