[FFmpeg-devel] Image sequence file names
Michael Niedermayer
michaelni at gmx.at
Tue Aug 30 22:39:06 CEST 2011
On Tue, Aug 30, 2011 at 09:34:49PM +0200, Robert Petka wrote:
> Dňa 26. 8. 2011 4:40, Michael Niedermayer wrote / napísal(a):
>> On Thu, Aug 25, 2011 at 10:12:25PM +0200, Robert Petka wrote:
[...]
> Hi again,
> here is my latest try to send you patch. I have used different editor
> this time. Patcheck writes just bunch of grep unrecognized option
> messages.
maybe your grep is not supported by patcheck
[...]
> +
> + if(i == -1) {
> + /* Files are in same directory as application */
> + snprintf(dirPath, buffsize,"./");
> + } else {
> + av_strlcpy(dirPath, inPath, i + 1);
> + dirPath[i + 1] = '\0';
> + }
> +}
> +
> +static int get_index_for_file(const char* path)
> +{
> + int length, i, last_digit, first_digit, index;
> + length = strlen(path);
> +
> + first_digit = -1;
> + last_digit = -1;
> +
> + for(i=length-1;i>=0;i--) {
> + if(last_digit == -1) {
> + if(isdigit(path[i]))
> + last_digit = i;
> + } else {
> + if(isdigit(path[i]))
> + first_digit = i;
> + else
> + break;
> + }
> + }
> +
> + index = -1;
> + if(first_digit != -1) {
> + sscanf(path + first_digit,"%d%*s",&index);
the %*s seems unneeded
also make sure your code does not break protocols other than
file://
like http://
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110830/ea3abcee/attachment.asc>
More information about the ffmpeg-devel
mailing list