After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735653 - mpegts: return early if packetizing short section
mpegts: return early if packetizing short section
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal normal
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-29 07:25 UTC by Jesper Larsen
Modified: 2015-06-12 18:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mpegts: return early if packetizing short section (1.01 KB, patch)
2014-08-29 07:25 UTC, Jesper Larsen
reviewed Details | Review
[V2] mpegts: return early if packetizing short section (1.47 KB, patch)
2014-12-19 13:38 UTC, Jesper Larsen
none Details | Review
[V3] mpegts: return early if packetizing short section (1.21 KB, patch)
2014-12-19 13:44 UTC, Jesper Larsen
committed Details | Review

Description Jesper Larsen 2014-08-29 07:25:54 UTC
Created attachment 284793 [details] [review]
mpegts: return early if packetizing short section

Patch that corrects _packetize_common_section function behaviour when dealing with short sections. 

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.
Comment 1 Tim-Philipp Müller 2014-12-19 13:03:52 UTC
Comment on attachment 284793 [details] [review]
mpegts: return early if packetizing short section

>   if (!section->short_section)
>     *data |= 0x80;
> 
>+  /* short sections do not contain more fields */
>+  if (section->short_section)
>+    return;
>+

Looks good to me, but how about moving that if/return up before the previous if (!section->short_section) check, and getting rid of that then?
Comment 2 Jesper Larsen 2014-12-19 13:38:06 UTC
Created attachment 293047 [details] [review]
[V2] mpegts: return early if packetizing short section

Moved if->return statement up a bit to reduce code
Comment 3 Jesper Larsen 2014-12-19 13:44:53 UTC
Created attachment 293049 [details] [review]
[V3] mpegts: return early if packetizing short section

Oops. The diff for the common submodule had sneaked its way in into the last patch
Comment 4 Tim-Philipp Müller 2015-06-12 18:24:17 UTC
Oops, missed the update, sorry. Pushed now:

commit 355439206da3f1f5e91a5d1002852fdf5c904e91
Author: Jesper Larsen <knorr.jesper@gmail.com>
Date:   Fri Dec 19 14:43:20 2014 +0100

    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