[MPlayer-dev-eng] [PATCH] Use unrar for open vobsubs if available

Rich Felker dalias at aerifal.cx
Thu Dec 6 14:03:46 CET 2007


On Thu, Dec 06, 2007 at 07:20:54PM +0800, Ulion wrote:
> +    while (fgets(buf, sizeof(buf), rar_pipe)) {
> +        char fname[1024];
> +        int packsize, unpsize, ratio;
> +        int day, month, year, hour, min;
> +
> +        if (sscanf(buf, "%1023s %d %d %d%% %d-%d-%d %d:%d",
> +                   fname, &unpsize, &packsize, &ratio,
> +                   &day, &month, &year, &hour, &min) == 9) {

This code fails on spaces in filenames. Is there any way to handle
them? Parsing from end-of-line to beginning, perhaps, but it would be
rather ugly..

Rich



More information about the MPlayer-dev-eng mailing list