Skip to content

Commit

Permalink
minor change in handling non-audio data ids
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-taylor committed Feb 16, 2012
1 parent 098a7d0 commit f54acbb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions read_dat.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ main(int argc, char *argv[]) {
break;
case 'q':
option_print_warnings = 0;
verbosity = 0;
break;
case 'r':
max_audio_seconds_read = atof(optarg);
Expand Down Expand Up @@ -545,17 +546,20 @@ process_frame(unsigned char *frame, frame_info_t *info, frame_info_t *next_info)
printf("Exiting because because %d consecutive frames of non-audio data encountered\n", consecutive_nonaudio_frames);
return 0;
} else {
if (track_fd == -1) {
if (verbosity > 1)
printf("Skipping frame %d because of non-audio dataid and not in track\n", info->frame_number);
return 1;
}
if (next_info->invalid != 2 && !frame_info_inconsistent(&track_info, next_info)) {
if (verbosity >= 1)
printf("Frame %d ignoring non audio dataid because next frame is audio and its frame info is with previous frame\n", info->frame_number);
} else if (consecutive_nonaudio_frames >= max_consecutive_nonaudio_frames_track) {
if (verbosity > 1)
printf("Skipping frame %d because of non-audio dataid\n", info->frame_number);
if (track_fd != -1) {
if (verbosity >= 1)
printf("Closing track %d because %d frames of non-audio data encountered\n", track_number, consecutive_nonaudio_frames);
close_track();
}
if (verbosity >= 1)
printf("Closing track %d because %d frames of non-audio data encountered\n", track_number, consecutive_nonaudio_frames);
close_track();
} else {
if (verbosity >= 1)
printf("Ignoring non audio dataid on frame %d\n", info->frame_number);
Expand Down

0 comments on commit f54acbb

Please sign in to comment.