mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed regenerating the index file of a recording in case it is present, but empty
This commit is contained in:
		| @@ -3563,6 +3563,8 @@ Stefan Herdler <herdler@gmx.de> | |||||||
|  ".sort" file |  ".sort" file | ||||||
|  for reporting faulty memory handling in cString::Append() |  for reporting faulty memory handling in cString::Append() | ||||||
|  for adding failsafe defaults for 'make LCLBLD=1' to the Makefile |  for adding failsafe defaults for 'make LCLBLD=1' to the Makefile | ||||||
|  |  for reporting the index file of a recording not being regenerated in case it is | ||||||
|  |  present, but empty | ||||||
|  |  | ||||||
| Tobias Faust <tobias.faust@gmx.de> | Tobias Faust <tobias.faust@gmx.de> | ||||||
|  for the original "jumpingseconds" patch |  for the original "jumpingseconds" patch | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -9811,3 +9811,5 @@ Video Disk Recorder Revision History | |||||||
|   or above. |   or above. | ||||||
| - Added periodic calls to malloc_trim(0) to reduce memory consumption (thanks to | - Added periodic calls to malloc_trim(0) to reduce memory consumption (thanks to | ||||||
|   Onur Sent<6E>rk). |   Onur Sent<6E>rk). | ||||||
|  | - Fixed regenerating the index file of a recording in case it is present, but empty | ||||||
|  |   (reported by Stefan Herdler). | ||||||
|   | |||||||
| @@ -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: recording.c 5.18 2022/11/22 14:33:48 kls Exp $ |  * $Id: recording.c 5.19 2022/11/28 14:39:23 kls Exp $ | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "recording.h" | #include "recording.h" | ||||||
| @@ -2579,7 +2579,7 @@ cIndexFile::cIndexFile(const char *FileName, bool Record, bool IsPesRecording, b | |||||||
|               cCondWait::SleepMs(INDEXFILETESTINTERVAL); |               cCondWait::SleepMs(INDEXFILETESTINTERVAL); | ||||||
|         } |         } | ||||||
|      int delta = 0; |      int delta = 0; | ||||||
|      if (!Record && access(fileName, R_OK) != 0) { |      if (!Record && (access(fileName, R_OK) != 0 || FileSize(fileName) == 0)) { | ||||||
|         // Index file doesn't exist, so try to regenerate it: |         // Index file doesn't exist, so try to regenerate it: | ||||||
|         if (!isPesRecording) { // sorry, can only do this for TS recordings |         if (!isPesRecording) { // sorry, can only do this for TS recordings | ||||||
|            resumeFile.Delete(); // just in case |            resumeFile.Delete(); // just in case | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user