261e9348ef 
								
							
								 
							
						 
						
							
							
								
								lavf: add a common function for selecting a pcm codec from parameters  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7709ce029a 
								
							
								 
							
						 
						
							
							
								
								lavf: avoid integer overflow in ff_compute_frame_duration()  
							
							Scaling the denominator instead of the numerator if it is too large
loses precision. Fixes an assert caused by a negative frame duration in
the fuzzed sample nasa-8s2.ts_s202310.
CC: libav-stable@libav.org  
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0efcf16a3e 
								
							
								 
							
						 
						
							
							
								
								replace av_log(0, by av_log(NULL,  
							
							The first parameter is a pointer and NULL is more correct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d513fb1c75 
								
							
								 
							
						 
						
							
							
								
								Add -skip_initial_bytes option.  
							
							Fixes ticket #1909 . 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								19660a8876 
								
							
								 
							
						 
						
							
							
								
								Allow use of @ character in username and passwords embedded in URLs  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4bee03034b 
								
							
								 
							
						 
						
							
							
								
								lavf: let av_find_best_stream use bitrate info if available  
							
							I guess the user expects to see the stream with the highest bitrate, not with
the most frames, this is especially useful for multi bitrate streams.
This patch changes av_find_best_stream to select the stream based on a number
of conditions, the first condition has the highest priority, the last condition
has the lowest:
1) Select the stream with the highest FFMIN(5, codec_info_nb_frames) value
2) Select the stream with the highest bitrate
3) Select the stream with the highest codec_info_nb_frames
4) Select the first stream
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								af9ec3dd1d 
								
							
								 
							
						 
						
							
							
								
								av_probe_input_format3: support NULL as buffer. Fixes null ptr deref  
							
							Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7ec1fe1f47 
								
							
								 
							
						 
						
							
							
								
								lavf: Dont compare absolute to relative timestamps in duration gcd  
							
							This prevents a division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2ca649f177 
								
							
								 
							
						 
						
							
							
								
								utils: fix integer overflow with DURATION_MAX_READ_SIZE  
							
							Fixes CID703746
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f742c7b2ce 
								
							
								 
							
						 
						
							
							
								
								lavf: fix integer overflow in rfps calculation  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6992b0bfc2 
								
							
								 
							
						 
						
							
							
								
								utils: fix rounding of micro seconds  
							
							Found-by: Johan Wessfeldt <johan.wessfeldt@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e12cfd044c 
								
							
								 
							
						 
						
							
							
								
								lavf: const correctness for avformat_new_stream  
							
							Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5442c6cce3 
								
							
								 
							
						 
						
							
							
								
								lavf: fix duration estimation for multi program TS  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								31cdf6002a 
								
							
								 
							
						 
						
							
							
								
								lavf: increase retries to guess duration from pts by 1  
							
							This fixes finding the duration for one TS file
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ee23dcf534 
								
							
								 
							
						 
						
							
							
								
								avformat_free_context: allow NULL as argument  
							
							Fixes CID703682
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								901f4bb6fc 
								
							
								 
							
						 
						
							
							
								
								utils: consider mpeg4 in mp4/mov to have a unreliable timebase  
							
							Partly fixes Ticket1664
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								45bd0d15f4 
								
							
								 
							
						 
						
							
							
								
								lavf: fix fps detection with PAFF H.264  
							
							Fixes Ticket1065
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								120b38b966 
								
							
								 
							
						 
						
							
							
								
								avio: redesign ffio_rewind_with_probe_data()  
							
							This prevents a double free
Fixes CID718285
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								59cbedfc3d 
								
							
								 
							
						 
						
							
							
								
								update_initial_timestamps: increase pts_buffer size  
							
							Fixes CID733786
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								317505b566 
								
							
								 
							
						 
						
							
							
								
								lavf: do not prematurely accept a format with low score in init_input()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								94f5470a20 
								
							
								 
							
						 
						
							
							
								
								lavf: add a AVPROBE_SCORE_RETRY instead of using hardcoded values.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								33893e6abc 
								
							
								 
							
						 
						
							
							
								
								url: Handle relative urls starting with two slashes  
							
							This is defined by RFC 3986 section 5.4.1 to be handled this way.
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								eea003814c 
								
							
								 
							
						 
						
							
							
								
								url: Handle relative urls being just a new query string  
							
							Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a6363e3d89 
								
							
								 
							
						 
						
							
							
								
								url: Don't treat slashes in query parameters as directory separators  
							
							Strip off query parameters from the original url before
applying the new relative path.
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								716d413c13 
								
							
								 
							
						 
						
							
							
								
								Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								55f9037f38 
								
							
								 
							
						 
						
							
							
								
								avformat: split muxing functions from util.c  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d3c40a7d1d 
								
							
								 
							
						 
						
							
							
								
								avformat: const correctness for av_hex_dump / av_hex_dump_log  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								72eaba5e4f 
								
							
								 
							
						 
						
							
							
								
								avformat: Convert some commented-out printf/av_log instances to av_dlog  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								44a7a6300d 
								
							
								 
							
						 
						
							
							
								
								lavf: free probe data in case we close before probing finished  
							
							Fixes Ticket1634
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2e4ec8947d 
								
							
								 
							
						 
						
							
							
								
								lavf: fill in past dts based on reordered pts once the delay becomes known.  
							
							Previously we had ignored the past dts and just filled in from the
point where we have had sufficient information.
This should fix Ticket1734
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a8e3815db5 
								
							
								 
							
						 
						
							
							
								
								lavf: factorize timestamp shift in update_initial_timestamps()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3ba0dab76a 
								
							
								 
							
						 
						
							
							
								
								lavf: Add support offset timestamps on muxing.  
							
							This allows avoiding negative timestamps.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								299c0b30a6 
								
							
								 
							
						 
						
							
							
								
								lavf: fix bug that caused has_decode_delay_been_guessed() to never return !=0  
							
							Possibly fixes Ticket1724
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4b80a619b7 
								
							
								 
							
						 
						
							
							
								
								Handle the following type of relative URL correctly:  
							
							http://a/b  + //c/d = http://c/d 
http://a/b?c  + ?d = http://a/b?d 
http://a/b?c/d  + /e = http://a/e 
Updated with feedback from Clément Bœsch
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4390f8c28d 
								
							
								 
							
						 
						
							
							
								
								Fix two "skiping" typo.  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6bcbe768bb 
								
							
								 
							
						 
						
							
							
								
								lavf: dont add apic streams for demuxers that dont support it.  
							
							Fixes crash
Fixes ticket1730
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								bbe9fe469a 
								
							
								 
							
						 
						
							
							
								
								lavf/utils: remove loop on AVERROR(EAGAIN) in av_read_frame()  
							
							The loop was introduced in 64d340c62ad5954c1a834df2d26057135e771774, and
was likely breaking non blocking reads as it busy loops. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9eb296572e 
								
							
								 
							
						 
						
							
							
								
								lavf: use a malloced AVFrame in try_decode_frame().  
							
							This allows using avcodec_free_frame() to free it properly. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								64d340c62a 
								
							
								 
							
						 
						
							
							
								
								lavf/utils: add error check in av_read_frame()  
							
							In particular, fix crash when the input file contains no packets (e.g. an
ffmeta input). 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								21c4393f1c 
								
							
								 
							
						 
						
							
							
								
								lavf/find_stream_info: make sure we decode at least one frame for DTS  
							
							The channel layout at the demuxer layer is commonly wrong and would
otherwise be used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								61a84755a9 
								
							
								 
							
						 
						
							
							
								
								lavf: dont open a decoder at the top of find_stream_info before probing has finished  
							
							It could open the wrong decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a380f82c53 
								
							
								 
							
						 
						
							
							
								
								lavf: allow using request_probe as a score threshold to accept a codec  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1cc569ddda 
								
							
								 
							
						 
						
							
							
								
								lavf: zero data/size of the packet passed to read_packet().  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6746cd7f61 
								
							
								 
							
						 
						
							
							
								
								lavf probe: prevent codec probe with no data at all seen  
							
							This occurs with fuzzed mpeg-ts files. set_codec_from_probe_data() is
called with a zeroed AVProbeData since no packet made through for
specific stream. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								07d2d06395 
								
							
								 
							
						 
						
							
							
								
								Remove code that duplicates existing code a few lines down.  
							
							This also fixes a potential crash since s->pb can be NULL.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3f7fd59d15 
								
							
								 
							
						 
						
							
							
								
								avformat: fix typo in avformat_close_input  
							
							The condition should not be &&. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3b4bb19e63 
								
							
								 
							
						 
						
							
							
								
								lavf: flush the output AVIOContext in av_write_trailer().  
							
							This is consistent with stdio and is what we want to do in all cases.
Fixes a bug in the voc muxer which didn't flush in write_trailer()
previously. This is the cause of the change in the test results. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0c270239c2 
								
							
								 
							
						 
						
							
							
								
								lavf: cosmetics, reformat av_write_trailer().  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e2d643efcd 
								
							
								 
							
						 
						
							
							
								
								lavf/compute_pkt_fields: only run pts by duration correction if reference ts is available  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								44272c1ccc 
								
							
								 
							
						 
						
							
							
								
								avformat: refactor avformat_close_input  
							
							Do not crash if the input format is not allocated yet. 
							
						 
						13 years ago