Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: rename cuttings patch
Hello, daniel peess,
since I have no VDR, I can't test it: Does VDR really overwrite existing (cutted) recordings, without a question? I can't believe this!
I guess this while(1) loop is a little bit dangerous! And: Filenames have a maximum length, so adding 500 times a prefix will make the name too long!
(I don't think it will ever happen, but I don't know it. Someone said a few years ago: "640kb should be enough for everybody")
Good work, nevertheless :-)
Florian
======= At 2003-04-30, 22:45:00 you wrote: =======
>hi,
>
>for those who are interested, here's a small patch that modifies vdr to use
>new names for each cutting, instead of overwriting the previous "":
>
>cu,
>daniel
>
>+ while(1)
>+ {
>+ const char *p = PrefixVideoFileName(FileName(), Prefix);
>+ if (p) {
>+ free(fileName);
>+ fileName = strdup(p);
>+ }
>+ else return NULL;
>+
>+ // check if name already exists, add prefix again if so
>+ struct stat fs;
>+ if (stat(fileName, &fs) == 0 ) continue;
>+ return fileName;
>+ }
> }
= = = = = = = = = = = = = = = = = = = =
Best regards.
Florian Bartels
Florian.Bartels@envisage.de
2003-04-30
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index