Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12313 closed Patch - Bug Fix (fixed)

Fix 32 to 64 bit integer arithmetic for first PVR-150 recordedseek record

Reported by: faginbagin <mythtv@…> Owned by: paulh
Priority: minor Milestone: 0.27.5
Component: MythTV - Recording Version: 0.27.4
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Commercial flagging was broken for PVR-150/300/500 recordings. I think it may have been limited to 32 bit O/Ss due to a conversion from a 32 bit unsigned int to a 64 bit signed int, which caused the first recordedseek record to look like this:

chanid  starttime           mark    offset      type
2005    2014-11-02 07:00:00 0       4294967146  9

That offset=4294967146 caused mythcommflag's attempts to seek to the beginning of a recording to fail and caused numerous decoding errors. The offset in hex is 0xffffff6a, which happens to be the 32 bit value of -150 base 10. I tracked the root cause down to one line in libmythtv/recorders/dtvrecorder.cpp and fixed it with a typecast. See attached patch. After the patch, no recordedseek record is inserted for mark=0 and type=9.

Attachments (1)

pvr-150-integer.patch (668 bytes) - added by faginbagin <mythtv@…> 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by faginbagin <mythtv@…>

Attachment: pvr-150-integer.patch added

comment:1 Changed 9 years ago by paulh

There are reports on the user list this patch does fix the problem.

comment:2 Changed 9 years ago by paulh

Owner: changed from JYA to paulh
Status: newaccepted

comment:3 Changed 9 years ago by faginbagin <mythtv@…>

Resolution: fixed
Status: acceptedclosed

In eb0e5050a4af098b9c9dd392c324e1993b2c590e/mythtv:

DTVRecorder: Fix 32 to 64 bit integer arithmetic in FindPSKeyFrames()

This is reported to fix commercial flagging of PVR-150/300/500 recordings
possibly only affecting 32 bit O/Ss due to a bad conversion from a 32 bit
unsigned int to a 64 bit signed int.

Fixes #12313.

Signed-off-by: Paul Harrison <pharrison@…>

comment:4 Changed 9 years ago by faginbagin <mythtv@…>

In a1096aa9fa4177a66a0cc45196c9e8179944efbd/mythtv:

DTVRecorder: Fix 32 to 64 bit integer arithmetic in FindPSKeyFrames()

This is reported to fix commercial flagging of PVR-150/300/500 recordings
possibly only affecting 32 bit O/Ss due to a bad conversion from a 32 bit
unsigned int to a 64 bit signed int.

Fixes #12313.

Signed-off-by: Paul Harrison <pharrison@…>
(cherry picked from commit eb0e5050a4af098b9c9dd392c324e1993b2c590e)

comment:5 Changed 9 years ago by paulh

Milestone: unknown0.27.5
Note: See TracTickets for help on using tickets.