Skip to content

Commit

Permalink
Use 4 digits for image file names, as some movies have over 10000 subs.
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Oct 5, 2014
1 parent a6abbd6 commit 7293ac2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vobsub2srt.c++
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void dump_pgm(std::string const &filename, unsigned counter, unsigned width, uns
unsigned stride, unsigned char const *image, size_t image_size) {

char buf[500];
snprintf(buf, sizeof(buf), "%s-%03u.pgm", filename.c_str(), counter);
snprintf(buf, sizeof(buf), "%s-%04u.pgm", filename.c_str(), counter);
FILE *pgm = fopen(buf, "wb");
if(pgm) {
fprintf(pgm, "P5\n%u %u %u\n", width, height, 255u);
Expand Down

0 comments on commit 7293ac2

Please sign in to comment.