libmodplug icon indicating copy to clipboard operation
libmodplug copied to clipboard

Implement probing for FFmpeg

Open DzonnyDZ opened this issue 11 years ago • 1 comments

FFmpeg relies on libraries probing capabilities do detect if a file is in a format supported by the library. Please implement probing for file formats supported by libmodplug, so FFmpeg is able to detect mod files with invalid extension. See https://trac.ffmpeg.org/ticket/2583 & https://trac.ffmpeg.org/ticket/4153

DzonnyDZ avatar Dec 05 '14 16:12 DzonnyDZ

Here's how ffmpeg does probing:

  • the application sends libavformat a small memory buffer containing the start of the file being probed (the buffer doesn't necessarily contain the whole file)
  • the probe function returns a detection score
  • this score is compared to other probers
  • if the score is not high enough, it retries with a larger probe buffer (up until a maximum size)

So what libmodplug should provide is a function that checks a buffer whether it contains a known file header.

ghost avatar Apr 29 '15 10:04 ghost