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 635281 - [mpegtsparse] TDT packets are only parsed for odd hours
[mpegtsparse] TDT packets are only parsed for odd hours
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.21
Assigned To: Andoni Morales
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-19 16:47 UTC by Andoni Morales
Modified: 2010-11-23 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't calculate the CRC for TOT tables (1.18 KB, patch)
2010-11-19 16:48 UTC, Andoni Morales
committed Details | Review
fix handling of TOT and TDT sections (1.74 KB, patch)
2010-11-19 16:48 UTC, Andoni Morales
committed Details | Review
Fix mistake in previous patch (839 bytes, patch)
2010-11-19 17:31 UTC, Andoni Morales
committed Details | Review
Create sub buffer with the section length (1.98 KB, patch)
2010-11-22 11:33 UTC, Andoni Morales
committed Details | Review

Description Andoni Morales 2010-11-19 16:47:12 UTC
I have found a very strange bug in mpegtsparse for TDT packets, which are only parsed for odd hours :/
It results that TDT and TOT sections doesn't have the same structure as other sections and the packetizer is not parsing them properly. The hour bit of the TDT table is the current_next_indicator bit for the other sections, invalidating the TDT tables for even hours.

mpegtsparse: fix handling of TOT and TDT sections
    
TDT and TOT sections, with PID=0x14, doesn't extend to several packets
and the section filter is not needed here and shouldn't be used at all
for these tables because the have a different structure.
For example, TDT tables were not parsed for odd hours because this bit
is the 'current_next_indicator' bit for the other sections, and the table
was discarded.

mpegtsparse: don't calculate the CRC for TOT tables
    
TOT tables, with table_id=0x73, don't have a CRC, so don't calcute it
Comment 1 Andoni Morales 2010-11-19 16:48:14 UTC
Created attachment 174857 [details] [review]
don't calculate the CRC for TOT tables
Comment 2 Andoni Morales 2010-11-19 16:48:56 UTC
Created attachment 174859 [details] [review]
fix handling of TOT and TDT sections
Comment 3 Alessandro Decina 2010-11-19 17:12:54 UTC
commit b11f737096b34cd911d06489fd988289c5c38981
Author: Andoni Morales Alastruey <amorales@flumotion.com>
Date:   Fri Nov 19 17:25:01 2010 +0100

    mpegtsparse: fix handling of TOT and TDT sections. Fixes #635281.
    
    TDT and TOT sections, with PID=0x14, doesn't extend to several packets
    and the section filter is not needed here and shouldn't be used at all
    for these tables because the have a different structure.
    For example, TDT tables were not parsed for odd hours because this bit
    is the 'current_next_indicator' bit for the other sections, and the table
    was discarded.

commit 2611b12970d2c2254ecc3f0a6f02a09ffa82a16a
Author: Andoni Morales Alastruey <amorales@flumotion.com>
Date:   Fri Nov 19 17:22:06 2010 +0100

    mpegtsparse: don't calculate the CRC for TOT tables. Fixes #635281.
    
    TOT tables, with table_id=0x73, don't have a CRC, so don't calcute it
Comment 4 Andoni Morales 2010-11-19 17:31:47 UTC
Created attachment 174865 [details] [review]
Fix mistake in previous patch

Fixes a stupid mistake in previous patch
Comment 5 Andoni Morales 2010-11-22 11:33:54 UTC
Created attachment 175019 [details] [review]
Create sub buffer with the section length

Just one thing missing in the previous patches. The sub buffer of the section must have the size of the section: 8+1+1+2+12+40 (in bits), so we can't reuse the first sub buffer created with the payload of the TS packet and we neeed to create a new one with 3 + section_length bytes.
Comment 6 Alessandro Decina 2010-11-23 10:32:10 UTC
I committed the last two patches, thanks!