[FFmpeg-devel] [PATCH v2 2/2] avformat: add demuxer for argonaut games' ASF format
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun Jan 19 20:52:07 EET 2020
Am So., 19. Jan. 2020 um 09:34 Uhr schrieb Zane van Iperen
<zane at zanevaniperen.com>:
> +static int argo_asf_probe(const AVProbeData *p)
> +{
> + int score;
> + ArgoASFFileHeader hdr;
> +
> + if (p->buf_size < ASF_FILE_HEADER_SIZE)
> + return AVPROBE_SCORE_RETRY;
Either assert that AVPROBE_PADDING_SIZE >=
ASF_FILE_HEADER_SIZE or (better) remove this hunk.
> +
> + score = 0;
> + if (av_match_ext(p->filename, "asf"))
> + score += AVPROBE_SCORE_EXTENSION;
Remove this hunk, we only match the extension if no
other way of recognizing a format works (tga).
> +
> + argo_asf_parse_file_header(&hdr, p->buf);
> +
> + if(hdr.magic != ASF_TAG)
> + return 0;
> +
> + if (argo_asf_is_known_version(&hdr))
> + score += 25;
Return MAX/2 + 1 in this case, feel free to ignore the other fields.
I wonder if "argo" isn't a better name for the format than "argo_asf".
Carl Eugen
More information about the ffmpeg-devel
mailing list