Skip to content

Commit

Permalink
Return an error when attempting to postprocess a non-MJR file
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed May 5, 2022
1 parent 5bca176 commit f5b6764
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions postprocessing/janus-pp-rec.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ int main(int argc, char *argv[])
if(bytes != 8 || prebuffer[0] != 'M') {
JANUS_LOG(LOG_WARN, "Invalid header at offset %ld (%s), the processing will stop here...\n",
offset, bytes != 8 ? "not enough bytes" : "wrong prefix");
if(!parsed_header) {
/* Not an MJR file? */
cmdline_parser_free(&args_info);
exit(1);
}
break;
}
if(prebuffer[1] == 'E') {
Expand Down

0 comments on commit f5b6764

Please sign in to comment.