aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/mp2t.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-09-28 21:35:12 -0700
committerGuy Harris <guy@alum.mit.edu>2016-09-29 04:35:48 +0000
commite91af83c637adaa7a9837de65f50596a32b08db0 (patch)
tree0c18941d92ae6ec9274f9035dfc26ed369e11572 /wiretap/mp2t.c
parent48b641576c53e9c7cef2e9487669460a975a0c0d (diff)
Replace some seeks forward with wtap_read_bytes() with a null buffer pointer.
If the seek forward is just skipping record content that's not (currently) interesting, use wtap_read_bytes() with a null buffer pointer; it catches short "reads" and requires less seeking, so it may work better when reading from a pipe. Change-Id: Ifb07d20e0391a8ed97da85149d971b4e9ef093a8 Reviewed-on: https://code.wireshark.org/review/17976 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/mp2t.c')
-rw-r--r--wiretap/mp2t.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/mp2t.c b/wiretap/mp2t.c
index 44ee0b728c..5507eef3bd 100644
--- a/wiretap/mp2t.c
+++ b/wiretap/mp2t.c
@@ -120,7 +120,7 @@ mp2t_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
/* if there's a trailer, skip it and go to the start of the next packet */
if (mp2t->trailer_len!=0) {
- if (-1 == file_seek(wth->fh, mp2t->trailer_len, SEEK_CUR, err)) {
+ if (!wtap_read_bytes(wth->fh, NULL, mp2t->trailer_len, err, err_info)) {
return FALSE;
}
}