From: Jesper Larsen Date: Fri, 19 Dec 2014 13:43:20 +0000 (+0100) Subject: mpegts: return early if packetizing short section X-Git-Tag: 1.19.3~507^2~8529 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=355439206da3f1f5e91a5d1002852fdf5c904e91;p=platform%2Fupstream%2Fgstreamer.git mpegts: return early if packetizing short section Short sections have 3 bytes of common header, while other sections have 8 bytes of common header. If packetizing common header of short section, we should stop after the first 3 bytes. https://bugzilla.gnome.org/show_bug.cgi?id=735653 --- diff --git a/gst-libs/gst/mpegts/gstmpegtssection.c b/gst-libs/gst/mpegts/gstmpegtssection.c index 319b5b0..dc62ac3 100644 --- a/gst-libs/gst/mpegts/gstmpegtssection.c +++ b/gst-libs/gst/mpegts/gstmpegtssection.c @@ -1128,9 +1128,12 @@ _packetize_common_section (GstMpegtsSection * section, gsize length) GST_WRITE_UINT16_BE (data, (section->section_length - 3) | 0x7000); } - if (!section->short_section) - *data |= 0x80; + /* short sections do not contain any further fields */ + if (section->short_section) + return; + /* Set section_syntax_indicator bit since we do not have a short section */ + *data |= 0x80; data += 2; /* subtable_extension - 16 bit uimsbf */