Move the probe loop from av_open_input_file() into its own method
authorMicah F. Galizia <micahgalizia@gmail.com>
Sun, 7 Mar 2010 22:42:11 +0000 (22:42 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sun, 7 Mar 2010 22:42:11 +0000 (22:42 +0000)
commit4245c6ec4ec357fb7bac781d78f9c7d6fa1c8ce7
tree1c97dd710eb4748923941c25ae00516679730f26
parent6580d5e377cf7a54589fd7dcb6c754ef271ad8d5
Move the probe loop from av_open_input_file() into its own method
av_probe_input_buffer() 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 appended 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).

Patch by Micah F. Galizia printf("%s%s@%s.%s", "micah", "galizia", "gmail", "com").

Originally committed as revision 22296 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/internal.h
libavformat/utils.c