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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to