Skip to content

Commit

Permalink
Corrected janus pp rec (#2472)
Browse files Browse the repository at this point in the history
Corrected data recordings packet header read (using fread with a size > 1 bytes returns the number of elements read, not bytes)
  • Loading branch information
ricardo-salgado-tekever committed Dec 7, 2020
1 parent 4b1444f commit 018f8b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postprocessing/janus-pp-rec.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,8 @@ int main(int argc, char *argv[])
if(data) {
/* Things are simpler for data, no reordering is needed: start by the data time */
gint64 when = 0;
bytes = fread(&when, sizeof(gint64), 1, file);
if(bytes < (int)sizeof(gint64)) {
bytes = fread(&when, 1, sizeof(gint64), file);
if(bytes < sizeof(gint64)) {
JANUS_LOG(LOG_WARN, "Missing data timestamp header");
break;
}
Expand Down

0 comments on commit 018f8b9

Please sign in to comment.