From f35865428b3a14d8aac47db78e2f59c5b1f1df53 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 1 May 2020 14:24:05 -0700 Subject: 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 --- wiretap/mpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wiretap') 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; } -- cgit v1.2.3