GNOME Bugzilla – Bug 735653
mpegts: return early if packetizing short section
Last modified: 2015-06-12 18:24:35 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 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?
Created attachment 293047 [details] [review] [V2] mpegts: return early if packetizing short section Moved if->return statement up a bit to reduce code
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
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