diff options
Diffstat (limited to 'wiretap/mpeg.c')
-rw-r--r-- | wiretap/mpeg.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/wiretap/mpeg.c b/wiretap/mpeg.c index 2f4998ebb3..abe87a37fe 100644 --- a/wiretap/mpeg.c +++ b/wiretap/mpeg.c @@ -220,32 +220,30 @@ mpeg_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, return TRUE; } -static int +static gboolean mpeg_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) { *data_offset = file_tell(wth->fh); - if (!mpeg_read_packet(wth, wth->fh, &wth->phdr, wth->frame_buffer, - FALSE, err, err_info)) - return -1; - return REC_TYPE_PACKET; + return mpeg_read_packet(wth, wth->fh, &wth->phdr, wth->frame_buffer, + FALSE, err, err_info); } -static int +static gboolean mpeg_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info) { if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1) - return -1; + return FALSE; if (!mpeg_read_packet(wth, wth->random_fh, phdr, buf, TRUE, err, err_info)) { if (*err == 0) *err = WTAP_ERR_SHORT_READ; - return -1; + return FALSE; } - return REC_TYPE_PACKET; + return TRUE; } struct _mpeg_magic { |