aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2020-05-01 14:24:05 -0700
committerGuy Harris <gharris@sonic.net>2020-05-01 21:27:41 +0000
commitf35865428b3a14d8aac47db78e2f59c5b1f1df53 (patch)
tree02ba645c6fa0ef3c774708e387b22c7f6cbd6621 /wiretap
parentf0db07421f20b50f0630198cb249f37368b89186 (diff)
mpeg: make sure the presence flags are set.
The time stamps are calculated by sequential processing, not read from a value in the packet record, so we don't supply them when reading randomly. Make sure the presence flags are 0 in that case (our callers currently don't look at time stamps when reading randomly, because some other file formats also don't supply time stamps for random reads, but we should make it clean). Change-Id: I494acc5bdf60e0a1de5cf002c3ea8403afce8a07 Reviewed-on: https://code.wireshark.org/review/37008 Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/mpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wiretap/mpeg.c b/wiretap/mpeg.c
index f0704b52ad..745dadfb56 100644
--- a/wiretap/mpeg.c
+++ b/wiretap/mpeg.c
@@ -170,8 +170,9 @@ mpeg_read_packet(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf,
rec->rec_type = REC_TYPE_PACKET;
- /* XXX - relative, not absolute, time stamps */
+ rec->presence_flags = 0; /* we may or may not have a time stamp */
if (!is_random) {
+ /* XXX - relative, not absolute, time stamps */
rec->presence_flags = WTAP_HAS_TS;
rec->ts = ts;
}