a76d0cdf21 
								
							
								 
							
						 
						
							
							
								
								libavutil: Move avpriv_open to a new file, file_open.c  
							
							Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								dfc6b5c814 
								
							
								 
							
						 
						
							
							
								
								file: Move win32 utf8->wchar open wrapper to libavutil  
							
							When libavformat was changed to use the new avpriv_open function
in 51eb213d001, this silently bypassed the existing wrapper for
win32. Move the win32 wrapper into libavutil/file.c to make sure
it gets called everywhere (not just in the libavformat case).
This makes sure that non-ascii file names gets opened properly
(where file names internally are stored as utf8, but they get
converted to wchar_t and opened with _wsopen).
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								87e8cbf709 
								
							
								 
							
						 
						
							
							
								
								libavutil: Don't use fcntl if the function does not exist  
							
							Not all platforms have the function.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0f1fb6c019 
								
							
								 
							
						 
						
							
							
								
								libavutil: Don't use fcntl if the function does not exist  
							
							Not all platforms have the function.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								869b04e891 
								
							
								 
							
						 
						
							
							
								
								libavutil: add avpriv_open() to open files with close-on-exec flag  
							
							Signed-off-by: Anton Khirnov <anton@khirnov.net> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								15816c8e8b 
								
							
								 
							
						 
						
							
							
								
								avutil: Include io.h with a separate condition from MapViewOfFile  
							
							The existence of MapViewOfFile isn't linked to the existence of
io.h.
Not all versions of windows have MapViewOfFile (in particular,
Windows Phone 8 and the "metro" windows 8 API subset don't),
while they still have io.h (and need it for open/read/close).
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c9454cb643 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: fix leak in error case  
							
							Fixes CID733796 Part2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								70766c2182 
								
							
								 
							
						 
						
							
							
								
								Add some more missing includes after removing the implicit common.h  
							
							Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1d9c2dc89a 
								
							
								 
							
						 
						
							
							
								
								Don't include common.h from avutil.h  
							
							Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d11baad055 
								
							
								 
							
						 
						
							
							
								
								lavu/file: include unistd.h only when available  
							
							The unistd.h header is only needed for the close() declaration.
If this header is not available, the close() declaration may be
provided by another header, e.g. io.h.
Signed-off-by: Mans Rullgard <mans@mansr.com> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								299ab0fd17 
								
							
								 
							
						 
						
							
							
								
								libavutil: Remove pointless file test program.  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								fd6af5375b 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: dont try the current directory with mkstemp() unless we are on windows  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e8e13358ad 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: change mode for fallback to 0600 to match mkstemp()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								74dbb5388e 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: Pass int log_offset, void *log_ctx  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								482aabd59a 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: fix error codes  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4105335c98 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: use O_EXCL  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								797c2ef970 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: try tempnam(NULL) first  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5746f91036 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: handle missing O_BINARY  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c9833fc33a 
								
							
								 
							
						 
						
							
							
								
								av_tempfile: fix alloc type for !HAVE_MKSTEMP  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								885158c887 
								
							
								 
							
						 
						
							
							
								
								Move av_tempfile() into libavutil, it is a generically usefull thing and its small.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								abc78a5a7c 
								
							
								 
							
						 
						
							
							
								
								Do not include log.h in avutil.h  
							
							Signed-off-by: Mans Rullgard <mans@mansr.com> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d0989bed22 
								
							
								 
							
						 
						
							
							
								
								Fix error check in av_file_map()  
							
							On failure, mmap() returns MAP_FAILED, which may or may not be -1.
Signed-off-by: Mans Rullgard <mans@mansr.com> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								314374e579 
								
							
								 
							
						 
						
							
							
								
								Use MAP_FAILED to check for mmap failure instead of manually  
							
							recreating the value. 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								10ff2967ea 
								
							
								 
							
						 
						
							
							
								
								file: Fix mmap error check.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								490a022d86 
								
							
								 
							
						 
						
							
							
								
								lavu: remove misc disabled cruft  
							
							
								
							
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2912e87a6c 
								
							
								 
							
						 
						
							
							
								
								Replace FFmpeg with Libav in licence headers  
							
							Signed-off-by: Mans Rullgard <mans@mansr.com> 
							
						 
						14 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								73f6d31e6c 
								
							
								 
							
						 
						
							
							
								
								Win32 support for av_file_map()  
							
							Originally committed as revision 26221 to svn://svn.ffmpeg.org/ffmpeg/trunk 
							
						 
						15 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f02cbc4590 
								
							
								 
							
						 
						
							
							
								
								Fix av_file_map(): replace stat(filename, &st) with fstat(fd, &st).  
							
							The file might be replaced between open() and stat().
Spotted by Mans.
Originally committed as revision 26075 to svn://svn.ffmpeg.org/ffmpeg/trunk 
							
						 
						15 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1b31037d62 
								
							
								 
							
						 
						
							
							
								
								Replace lstat() with stat() in av_file_map(). The lstat() use was wrong.  
							
							Originally committed as revision 26074 to svn://svn.ffmpeg.org/ffmpeg/trunk 
							
						 
						15 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0328b9ea39 
								
							
								 
							
						 
						
							
							
								
								Add av_file_map() and av_file_unmap() functions.  
							
							Originally committed as revision 26073 to svn://svn.ffmpeg.org/ffmpeg/trunk 
							
						 
						15 years ago