[Bug 786111] tsdemux: incorrectly parsing non-timestamp byte sequence in PES header as PTS time stamp
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Aug 29 14:20:21 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=786111
--- Comment #9 from Aaron Boxer <boxerab at gmail.com> ---
Comment on attachment 358661
--> https://bugzilla.gnome.org/attachment.cgi?id=358661
tsdemux: Handle quirk in jp2k es header handling
>From 8f88683929d40135a8ea0c5e985a9ba9981b0d07 Mon Sep 17 00:00:00 2001
>From: Edward Hervey <edward at centricular.com>
>Date: Tue, 29 Aug 2017 11:14:59 +0200
>Subject: [PATCH] tsdemux: Handle quirk in jp2k es header handling
>
>The jp2k specification (ITU-T T.800) specifies that the 'brat' box
>has two fields and the second one (AUF2) can be set to 0 for progressive
>streams.
>
>The problem is that the mpeg-ts specification (ITU-T H.222.0 06/2012)
>says that the AUF2 field is only present if the stream is interlaced
>
>In order to cope with both situation, accept those next 32bit if the
>stream is marked as progressive and those bits contain 0
>
>https://bugzilla.gnome.org/show_bug.cgi?id=786111
>---
> gst/mpegtsdemux/tsdemux.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
>index f802ae0ff..67501fe8d 100644
>--- a/gst/mpegtsdemux/tsdemux.c
>+++ b/gst/mpegtsdemux/tsdemux.c
>@@ -2730,8 +2730,14 @@ parse_jp2k_access_unit (TSDemuxStream * stream)
> goto error;
> #endif
> }
>+
> /* Time Code Box 'tcod' == 0x74636f64 */
>+ /* Some progressive streams might have a AUF[1] of value 0 present */
> header_tag = gst_byte_reader_get_uint32_be_unchecked (&reader);
>+ if (header_tag == 0 && !stream->jp2kInfos.interlace) {
>+ AUF[1] = header_tag;
Would it be clearer to set AUF[1] to 0 ?
>+ header_tag = gst_byte_reader_get_uint32_be_unchecked (&reader);
We should check that there is enough data to read this extra 32 bits for
progressive.
>+ }
> if (header_tag != 0x74636f64) {
> GST_ERROR_OBJECT (stream->pad,
> "Expected Time code box but found %d box instead", header_tag);
>--
>2.13.5
--
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