diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-02-11 18:13:15 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-02-12 02:13:53 +0000 |
commit | 41d734ec67217bb289f35f7497e26c13c2bf092f (patch) | |
tree | 40beed0c7829d1e158239ff83ef1df2c42ed2e6e | |
parent | d1fc161ab17da4da1a3a7b30a3cfce1912278f20 (diff) |
Adjust time stamps even if the secs value of the time stamp is 0.
If the seconds value in a time stamp is 0, that says nothing whatsoever
about whether it's supported or not - it's the presence flag, which
we've already tested and found to be set, that indicates whether the
time stamp is supported.
Bug: 12116
Change-Id: I91354783af7b6356d9806c7559d35da44ea4567f
Reviewed-on: https://code.wireshark.org/review/13913
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | editcap.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1562,9 +1562,7 @@ main(int argc, char *argv[]) previous_time = phdr->ts; } - /* assume that if the frame's tv_sec is 0, then - * the timestamp isn't supported */ - if (phdr->ts.secs > 0 && time_adj.tv.secs != 0) { + if (time_adj.tv.secs != 0) { temp_phdr = *phdr; if (time_adj.is_negative) temp_phdr.ts.secs -= time_adj.tv.secs; @@ -1573,9 +1571,7 @@ main(int argc, char *argv[]) phdr = &temp_phdr; } - /* assume that if the frame's tv_sec is 0, then - * the timestamp isn't supported */ - if (phdr->ts.secs > 0 && time_adj.tv.nsecs != 0) { + if (time_adj.tv.nsecs != 0) { temp_phdr = *phdr; if (time_adj.is_negative) { /* subtract */ if (temp_phdr.ts.nsecs < time_adj.tv.nsecs) { /* borrow */ |