mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed a compiler warning in cIndexFile::ConvertToPes() and added __attribute__((packed)) to tIndexPes and tIndexTs
This commit is contained in:
		| @@ -3582,6 +3582,7 @@ Helmut Binder <cco@aon.at> | ||||
|  for fixing mapping SIDs in MTD | ||||
|  for fixing updating the checksum in the CA table after mapping EMM PIDs for MTD | ||||
|  for fixing a compiler warning in ExchangeChars() | ||||
|  for suggesting to add __attribute__((packed)) to tIndexPes and tIndexTs | ||||
|  | ||||
| Ulrich Eckhardt <uli@uli-eckhardt.de> | ||||
|  for reporting a problem with shutdown after user inactivity in case a plugin is | ||||
|   | ||||
							
								
								
									
										4
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -9348,7 +9348,7 @@ Video Disk Recorder Revision History | ||||
|   Senzel). | ||||
| - Official release. | ||||
|  | ||||
| 2019-05-06: Version 2.4.1 | ||||
| 2019-05-07: Version 2.4.1 | ||||
|  | ||||
| - Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported | ||||
|   by Johann Friedrichs). | ||||
| @@ -9402,3 +9402,5 @@ Video Disk Recorder Revision History | ||||
| - Fixed a possible invalid lock sequence if the main menu is open and the user | ||||
|   switches to a channel that is currently not available, using the Channel+/- keys. | ||||
| - Fixed handling remote timers in case the response to LSTT is '550 No timers defined'. | ||||
| - Fixed a compiler warning in cIndexFile::ConvertToPes() and added __attribute__((packed)) | ||||
|   to tIndexPes and tIndexTs (suggested by Helmut Binder). | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * how to reach the author. | ||||
|  * | ||||
|  * $Id: recording.c 4.25 2019/05/06 11:26:06 kls Exp $ | ||||
|  * $Id: recording.c 4.26 2019/05/07 09:22:34 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "recording.h" | ||||
| @@ -2498,14 +2498,14 @@ void cIndexFileGenerator::Action(void) | ||||
| #define MAXINDEXCATCHUP    8 // number of retries | ||||
| #define INDEXCATCHUPWAIT 100 // milliseconds | ||||
|  | ||||
| struct tIndexPes { | ||||
| struct __attribute__((packed)) tIndexPes { | ||||
|   uint32_t offset; | ||||
|   uchar type; | ||||
|   uchar number; | ||||
|   uint16_t reserved; | ||||
|   }; | ||||
|  | ||||
| struct tIndexTs { | ||||
| struct __attribute__((packed)) tIndexTs { | ||||
|   uint64_t offset:40; // up to 1TB per file (not using off_t here - must definitely be exactly 64 bit!) | ||||
|   int reserved:7;     // reserved for future use | ||||
|   int independent:1;  // marks frames that can be displayed by themselves (for trick modes) | ||||
| @@ -2640,7 +2640,7 @@ void cIndexFile::ConvertToPes(tIndexTs *IndexTs, int Count) | ||||
|         IndexPes.type = uchar(IndexTs->independent ? 1 : 2); // I_FRAME : "not I_FRAME" (exact frame type doesn't matter) | ||||
|         IndexPes.number = uchar(IndexTs->number); | ||||
|         IndexPes.reserved = 0; | ||||
|         memcpy(IndexTs, &IndexPes, sizeof(*IndexTs)); | ||||
|         memcpy((void *)IndexTs, &IndexPes, sizeof(*IndexTs)); | ||||
|         IndexTs++; | ||||
|         } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user