Merge commit 'f920d089535bf7cf10aeda900cc43201c5e18cd0'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Jul 2014 19:02:56 +0000 (21:02 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Jul 2014 19:02:56 +0000 (21:02 +0200)
* commit 'f920d089535bf7cf10aeda900cc43201c5e18cd0':
  ismindex: Add an option for outputting files elsewhere than in the current directory

Conflicts:
tools/ismindex.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
tools/ismindex.c

@@@ -132,9 -135,8 +137,9 @@@ static int write_fragments(struct Track
      for (i = start_index; i < tracks->nb_tracks; i++) {
          struct Track *track = tracks->tracks[i];
          const char *type    = track->is_video ? "video" : "audio";
-         snprintf(dirname, sizeof(dirname), "QualityLevels(%d)", track->bitrate);
+         snprintf(dirname, sizeof(dirname), "%sQualityLevels(%d)", output_prefix, track->bitrate);
 -        mkdir(dirname, 0777);
 +        if (mkdir(dirname, 0777) == -1)
 +            return AVERROR(errno);
          for (j = 0; j < track->chunks; j++) {
              snprintf(filename, sizeof(filename), "%s/Fragments(%s=%"PRId64")",
                       dirname, type, track->offsets[j].time);
@@@ -226,7 -228,7 +231,7 @@@ static int read_mfra(struct Tracks *tra
      }
  
      if (split)
-         err = write_fragments(tracks, start_index, f);
 -        write_fragments(tracks, start_index, f, output_prefix);
++        err = write_fragments(tracks, start_index, f, output_prefix);
  
  fail:
      if (f)