[Bug 786111] New: tsdemux: mistaking byte sequence in PES header for PTS time stamp

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Aug 10 13:50:37 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=786111

            Bug ID: 786111
           Summary: tsdemux: mistaking byte sequence in PES header for PTS
                    time stamp
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: boxerab at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Test file:  http://s3.amazonaws.com/fox_misc/aperi_tr01_1s_pkts-C.cap.gz

Unzip and rename to test.cap.

Test pipeline:

GST_DEBUG=3 gst-launch-1.0 -v filesrc location=~/test.cap !  pcapparse !
tsdemux ! jpeg2000parse ! openjpegdec ! videoconvert ! imagefreeze ! ximagesink

Warnings:

0:00:01.070779503  8815      0x1831050 WARN               pesparser
pesparse.c:416:mpegts_parse_pes_header: bad PTS value
0:00:01.070781019  8815      0x1831050 WARN                 tsdemux
tsdemux.c:2253:gst_ts_demux_parse_pes_header: Error parsing PES header. pid:
0x45 stream_type: 0x6
0:00:01.070788151  8815      0x1831050 DEBUG              pesparser
pesparse.c:140:mpegts_parse_pes_header: header_size : 14
0:00:01.070821307  8815      0x1831050 WARN               pesparser
pesparse.c:416:mpegts_parse_pes_header: bad PTS value
0:00:01.070823313  8815      0x1831050 WARN                 tsdemux
tsdemux.c:2253:gst_ts_demux_parse_pes_header: Error parsing PES header. pid:
0x42 stream_type: 0x6


Reading the beginning of the PES header in method mpegts_parse_pes_header, I
get the following bytes:

0x80 0x0a 0x1b 0xd2 0xbd 0xfe

0x80 is a flag indicating a PTS, but the next byte
should have its low bit set.  Since it doesn't, the PTS
is rejected.

This same byte pattern appears for each PES packet, so it doesn't look like
corruption, as it is the same pattern.

This can't be a PTS time stamp, because it doesn't change.

So, it looks like tsdemux is incorrectly parsing these bytes as a PTS
time stamp.


Please note that the steam type is 0x6, indicating a private stream.
Also

#define ST_PS_VIDEO_MPEG2_DCII          0x80

So, perhaps this private stream is mistaken for a PTS.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list