[FFmpeg-devel] [PATCHv4] lavf: add libopenmpt demuxer
Nicolas George
george at nsup.org
Fri Jul 8 11:54:44 EEST 2016
Le tridi 13 messidor, an CCXXIV, Josh de Kock a écrit :
> +static int probe_openmpt(AVProbeData *p)
> +{
> + double ret;
> + FILE *file;
> +
> + if(!p->filename)
> + return 0;
> +
> + file = fopen(p->filename, "rb");
> + if (!file)
> + return AVERROR(errno);
> +
> + ret = openmpt_could_open_propability(openmpt_stream_get_file_callbacks(), file, 0.25, openmpt_logfunc, NULL);
> + fclose(file);
Unrelated to the speed concerns: I am rather dubious about the idea of
opening the file in a separate way in the probe function. It will only work
with the file protocol, and only if the protocol is not specified. I suspect
it could have other drawbacks.
The AVProbeData structure contains a significant portion of the file: why
not use it to call openmpt_could_open_propability()?
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160708/8ffa5bdb/attachment.sig>
More information about the ffmpeg-devel
mailing list