Opened 12 years ago

Closed 12 years ago

#1907 closed patch (fixed)

Patch to keep dvbsignalmonitor sectionreader in line

Reported by: mythdev@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

Changes to let myth handle pes data split over several transport stream packets mean that the original section reader code will not work when it reads any tables longer than a TSpacket (188 bytes)

This patch breaks up the received table and submits it to processdata as multiple TSpackets.

Attachments (3)

sr.diff (1.5 KB) - added by anonymous 12 years ago.
sr2.diff (6.9 KB) - added by mythdev@… 12 years ago.
sr3.diff (1.1 KB) - added by mythdev@… 12 years ago.

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by anonymous

Attachment: sr.diff added

comment:1 Changed 12 years ago by danielk

Resolution: invalid
Status: newclosed

This is not correct with respect to the continuity counter.

But also we shouldn't really be using MPEGStreamData::ProcessData?(), a better fix would be to create an MPEGStreamData::ProcessPESData() which accepts pre-assembled PSIP sections we get from the section reader instead of raw TS Packets.

comment:2 Changed 12 years ago by mythdev@…

Resolution: invalid
Status: closedreopened

agreed this was an attempt to minimise changes & the horrid cc hack works around the assembly ... sorry :)

Attached is a HandlePESTable - A ProcessPESData & ProcessPESPacket equivalent feels unnecessary - ymmv!

The PESPacket constructor used by this patch chopped the last byte of the checksum when copying in the pesdata. (Or I've misunderstood again) I've amended this but cannot find any other call to this constructor to test the effect.

If the constructor is not actually used anywhere else then it feels like the call to InitPESPacket should be replaced by a call to SetPSIOffset - in any case the line addinga recalculation of _badPacket ought to be needed because the buffers have been overwritten.

Changed 12 years ago by mythdev@…

Attachment: sr2.diff added

comment:3 Changed 12 years ago by danielk

Resolution: fixed
Status: reopenedclosed

(In [10147]) Fixes #1907. Fix for section reader in DVBSignalMonitor.

I didn't use the patch, it was much more complicated than it needed to be.

comment:4 Changed 12 years ago by mythdev@…

Resolution: fixed
Status: closedreopened

thats much neater - I thought I had to recreate the TS header in the pespacket.

Minor issue with current patch - it segfaults because the PESPacket constructor is called on function entry which is before the buffer is allocated. sr3.diff makes the buffer non-dynamic.

Changed 12 years ago by mythdev@…

Attachment: sr3.diff added

comment:5 Changed 12 years ago by danielk

Resolution: fixed
Status: reopenedclosed

(In [10166]) Fixes #1907. Fixes an extra derefence passed to as a void* param to read() which was overwriting the stack.

Note: See TracTickets for help on using tickets.