1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed a wrong alignment in cCiDateTime::SendDateTime()

This commit is contained in:
Klaus Schmidinger 2014-01-22 09:41:08 +01:00
parent 838566ea41
commit 549c499501
2 changed files with 5 additions and 2 deletions

View File

@ -8132,7 +8132,7 @@ Video Disk Recorder Revision History
and also to use the correct directory with --edit (the latter reported by Marko and also to use the correct directory with --edit (the latter reported by Marko
Mäkelä). Mäkelä).
2014-01-20: Version 2.1.4 2014-01-22: Version 2.1.4
- Updated 'sources.conf' (thanks to Antti Hartikainen). - Updated 'sources.conf' (thanks to Antti Hartikainen).
- cFont::CreateFont() now returns a dummy font in case there are no fonts installed. - cFont::CreateFont() now returns a dummy font in case there are no fonts installed.
@ -8157,3 +8157,4 @@ Video Disk Recorder Revision History
- Now unassigning CAMs from their devices when they are no longer used. - Now unassigning CAMs from their devices when they are no longer used.
- Now making sure the primary device goes into transfer mode for live viewing if the - Now making sure the primary device goes into transfer mode for live viewing if the
CAM wants to receive the TS data. CAM wants to receive the TS data.
- Fixed a wrong alignment in cCiDateTime::SendDateTime().

4
ci.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: ci.c 3.8 2014/01/16 11:43:33 kls Exp $ * $Id: ci.c 3.9 2014/01/22 09:39:06 kls Exp $
*/ */
#include "ci.h" #include "ci.h"
@ -865,7 +865,9 @@ void cCiDateTime::SendDateTime(void)
int L = (M == 1 || M == 2) ? 1 : 0; int L = (M == 1 || M == 2) ? 1 : 0;
int MJD = 14956 + D + int((Y - L) * 365.25) + int((M + 1 + L * 12) * 30.6001); int MJD = 14956 + D + int((Y - L) * 365.25) + int((M + 1 + L * 12) * 30.6001);
#define DEC2BCD(d) uint8_t(((d / 10) << 4) + (d % 10)) #define DEC2BCD(d) uint8_t(((d / 10) << 4) + (d % 10))
#pragma pack(1)
struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; }; struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; };
#pragma pack()
tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : short(htons(tm_loc.tm_gmtoff / 60)) }; tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : short(htons(tm_loc.tm_gmtoff / 60)) };
bool OldDumpTPDUDataTransfer = DumpTPDUDataTransfer; bool OldDumpTPDUDataTransfer = DumpTPDUDataTransfer;
DumpTPDUDataTransfer &= DumpDateTime; DumpTPDUDataTransfer &= DumpDateTime;