aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/mp2t.c
AgeCommit message (Collapse)AuthorFilesLines
2013-06-17Put the code to fill in the struct wtap_pkthdr and to read the packetGuy Harris1-33/+31
data into a common routine, and use it in both the read and seek-read routines. svn path=/trunk/; revision=49996
2013-06-16Have the seek-read routines take a Buffer rather than a guint8 pointerGuy Harris1-6/+7
as the "where to put the packet data" argument. This lets more of the libwiretap code be common between the read and seek-read code paths, and also allows for more flexibility in the "fill in the data" path - we can expand the buffer as needed in both cases. svn path=/trunk/; revision=49949
2013-05-18Fill in the struct wtap_pkthdr in the seek-read routine.Guy Harris1-23/+35
svn path=/trunk/; revision=49404
2012-12-27Do not call wtap_file_read_unknown_bytes() orGuy Harris1-2/+6
wtap_file_read_expected_bytes() from an open routine - open routines are supposed to return -1 on error, 0 if the file doesn't appear to be a file of the specified type, or 1 if the file does appear to be a file of the specified type, but those macros will cause the caller to return FALSE on errors (so that, even if there's an I/O error, it reports "the file isn't a file of the specified type" rather than "we got an error trying to read the file"). When doing reads in an open routine before we've concluded that the file is probably of the right type, return 0, rather than -1, if we get WTAP_ERR_SHORT_READ - if we don't have enough data to check whether a file is of a given type, we should keep trying other types, not give up. For reads done *after* we've concluded the file is probably of the right type, if a read doesn't return the number of bytes we asked for, but returns an error of 0, return WTAP_ERR_SHORT_READ - the file is apparently cut short. For NetMon and NetXRay/Windows Sniffer files, use a #define for the magic number size, and use that for both magic numbers. svn path=/trunk/; revision=46803
2012-12-26Squelch a (Y2.038K) warning.Guy Harris1-1/+1
svn path=/trunk/; revision=46751
2012-12-21Squelch implicit 64-bit-to-32-bit conversion warnings.Guy Harris1-1/+1
svn path=/trunk/; revision=46650
2012-10-16Add wtap_pseudo_header union to wtap_pkthdr structure.Jakub Zawadzki1-1/+1
Use pkthdr instead of pseudo_header as argument for dissecting. svn path=/trunk/; revision=45601
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45015
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-05Directly calculate the time stamp based on the offset in the stream fromGuy Harris1-20/+18
the first bit in the stream. This prevents accumulated truncation errors. Get the seek offset from file_tell(). svn path=/trunk/; revision=42436
2012-04-18From Rolf Fiedler:Anders Broman1-2/+3
patch to fix mp2t.c to reject more byte streams that are not MPEG2. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7132 svn path=/trunk/; revision=42127
2012-03-30From Martin Kaiser via ↵Jeff Morriss1-15/+63
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6984 : The attached patch extends the mpeg2 ts format detection to take into account that trailing bytes might be added to each packet. Once it finds no sync after 188 bytes, it checks an additional 40 bytes for the next sync byte and adjusts the packet size accordingly. Only the 188 bytes of the actual ts packet are passed on to wiretap, the trailer is omitted. svn path=/trunk/; revision=41863
2012-03-05From Martin Kaiser:Anders Broman1-2/+3
wiretap mpeg2 ts: eof vs short read https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6909 svn path=/trunk/; revision=41350
2012-03-05From Martin Kaiser:Anders Broman1-0/+13
wiretap mpeg2 ts: more thorough check for sync byte. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6908 svn path=/trunk/; revision=41349
2012-03-02Flag mp2t file as really having only relative time stamps. Put theGuy Harris1-0/+1
comment on its own line in mpeg.c as well. svn path=/trunk/; revision=41294
2012-03-02From Weston Schmidt: Add mpeg-ts capture file format support. ↵Anders Broman1-0/+174
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6894 svn path=/trunk/; revision=41286