Wireshark-bugs: [Wireshark-bugs] [Bug 7132] MPEG2 Transport Stream wiretap module wrongly opens
Date: Wed, 18 Apr 2012 01:03:50 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7132

--- Comment #4 from Rolf Fiedler <rolf.fiedler@xxxxxxxxxxxxx> 2012-04-18 01:03:49 PDT ---
(In reply to comment #3)
> Hi Rolf,
> 
> thanks for the sample. I'd agree that your patch fixes the problem. You're
> right, the detection of mpeg2 ts is quite difficult.
> 
> I was wondering if we could improve mpeg2 ts detection by requiring that an
> mpeg2 ts file starts at the beginning of a packet, i.e. the first byte must be
> a 0x47...
> 
> Best regards,
> 
>    Martin

Hi Martin,

thanks for your comment. Just relying on a starting byte will be good enough
for many other trace formats. Our trace format starts with 0x45, so that is not
a 0x47. But in general I believe there may be other formats that start with
0x47.

So how about requiring a minimum size for the mp2 ts and then checking all of
this for proper packet framing? Does it make sense to open mp2 ts files with
less than say 1KB?

For the time being my patch solves the issue for us, so I believe it should be
applied (it is just a one line change) until a more robust solution is found.
All the patch does is that it does require at least 2x 188 Bytes packets at the
start of the file (so mp2 ts files shorter than 376 bytes will be rejected).

Kind regards,
Rolf

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.