[FFmpeg-devel] [PATCHv3] lavf: add libopenmpt demuxer
Clément Bœsch
u at pkh.me
Sun Jun 19 22:49:22 CEST 2016
On Sun, Jun 19, 2016 at 12:49:56PM +0100, Josh de Kock wrote:
[...]
> +static int probe_openmpt(AVProbeData *p)
> +{
> + if(!p->filename)
> + return AVERROR(enoent);
> +
I'd say return 0 here instead
> + FILE *file = fopen(p->filename, "rb");
> + if (!file)
> + return AVERROR(errno);
> +
> + double ret = openmpt_could_open_propability(openmpt_stream_get_file_callbacks(), file, 1.0, openmpt_logfunc, NULL);
Please move the declaration of file and ret at the beginning of the scope
> + fclose(file);
> + return ret ? ret * AVPROBE_SCORE_MAX : 0;
So apparently this breaks FATE as it detects some random mp3 and others as
supported. You probably need to lower it down a lot, something like ret *
AVPROBE_SCORE_EXTENSION/2 or something.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160619/93841721/attachment.sig>
More information about the ffmpeg-devel
mailing list