210afae0ba 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: Check size argument in ff_add_index_entry()  
							
							Fixes infinite loop
Fixes Ticket3061
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								88d4ff4b5f 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: Check av_packet_new_side_data() return before using it  
							
							Fixes null pointer dereference
Fixes CID1108592
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a807c68253 
								
							
								 
							
						 
						
							
							
								
								avformat: use ff_alloc_extradata()  
							
							Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3fd79833e2 
								
							
								 
							
						 
						
							
							
								
								avformat: add ff_alloc_extradata() helper  
							
							Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5082fcc0e2 
								
							
								 
							
						 
						
							
							
								
								avformat: add support to force specific AVCodecs  
							
							previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f4aec34805 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: pass AVFormatContext to find_decoder()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a63b479d11 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: factor find_decoder() out  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ce67f442be 
								
							
								 
							
						 
						
							
							
								
								lavf: Avoid setting avg_frame_rate if delta_dts is negative  
							
							This avoids setting avg_frame_rate to invalid (negative)
values.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org 
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								49515cb840 
								
							
								 
							
						 
						
							
							
								
								avformat: remove duplicate includes  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								15672e832f 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: remove unused variable  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5626f994f2 
								
							
								 
							
						 
						
							
							
								
								avformat: Use av_reallocp() where suitable  
							
							Signed-off-by: Diego Biurrun <diego@biurrun.de> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e960b3e27e 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: Print warning if reallocating probe buffer failed  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5c2be81b39 
								
							
								 
							
						 
						
							
							
								
								Do not suggest to increase probesize for image2 files.  
							
							
								
							
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								68b4677420 
								
							
								 
							
						 
						
							
							
								
								lavf: Make probe_codec return an error code  
							
							This allows handling errors from av_realloc properly.
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2a1c24a267 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: use av_realloc_array()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8c9d6ee4f2 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: functions that add entries should not destroy the whole list on failure  
							
							The caller does not expect this, and in case of adding new streams would then
not even be able to deallocate them anymore.
This reverts a hunk from "avformat: Use av_reallocp_array() where suitable"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f369b9356c 
								
							
								 
							
						 
						
							
							
								
								avformat: Use av_reallocp_array() where suitable  
							
							Signed-off-by: Diego Biurrun <diego@biurrun.de> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								26f027fba1 
								
							
								 
							
						 
						
							
							
								
								lavf: fix the comparison in an overflow check  
							
							CC: libav-stable@libav.org 
Signed-off-by: Luca Barbato <lu_zero@gentoo.org> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								36cd017acd 
								
							
								 
							
						 
						
							
							
								
								avformat: make avformat_close_input() more tolerant.  
							
							The purpose of this commit is to make error management simpler and less
error prone, just like av_free() which is safe with NULL. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e5c338ba7a 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: assert position monotonicity in ff_find_last_ts()  
							
							This ensures that no read timestamp functions finds packets before the search window in ff_find_last_ts()
which could cause an infinite loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a5d67bc796 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: Fix bitrate overflow check  
							
							The check added in df33a58e53 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								df33a58e53 
								
							
								 
							
						 
						
							
							
								
								lavf: avoid integer overflow when estimating bitrate  
							
							Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org  
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								fab694dd39 
								
							
								 
							
						 
						
							
							
								
								lavf: move a variable declaration to the block where it's used  
							
							
								
							
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0388203098 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: fix duration_fields calculation when need_parsing=0  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c4810fbe4f 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: fix av_probe_input_buffer2() so it returns the probe score  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e31db621bf 
								
							
								 
							
						 
						
							
							
								
								avformat: export probe score  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a9d1a7c79b 
								
							
								 
							
						 
						
							
							
								
								avformat: move PROBE_BUF_M* to internal.h  
							
							They will be used by the mp3 probe function in the next commit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7a48b1c492 
								
							
								 
							
						 
						
							
							
								
								Remove FF_API_PKT_DUMP cruft. Not compiled since libavformat 54.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d4db7c334b 
								
							
								 
							
						 
						
							
							
								
								Integrate accessors.h header into internal.h  
							
							I have no idea why I added a separate header,
I think there is no good reason for it.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a48979d715 
								
							
								 
							
						 
						
							
							
								
								Reduce MAKE_ACCESSORS code duplication via a new header.  
							
							Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								caa7a49481 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: fix memleak with nobuffer  
							
							Fixes Ticket2802
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7950e519bb 
								
							
								 
							
						 
						
							
							
								
								Disable deprecation warnings for cases where a replacement is available  
							
							
								
							
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c5b46a064d 
								
							
								 
							
						 
						
							
							
								
								lavf: Don't interpret just slightly broken timestamps as wraparound  
							
							This avoids breaking some slightly incorrect (dts > pts) timestamps
in sample HLS streams from Apple.
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								37ecd67b5e 
								
							
								 
							
						 
						
							
							
								
								Revert "avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716"  
							
							This causes a race condition with VLC. Its plausible that other
applications also would have races with it and its just fixing a memleak when
the user application forgets to free the codec. It causes more
problems than it solves in its current form, thus the revert.
Better solutions are welcome
This reverts commit 0f229f9b91 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0f229f9b91 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e740929a07 
								
							
								 
							
						 
						
							
							
								
								lavf: Make sure avg_frame_rate can be calculated without integer overflow  
							
							If either of the deltas is too large for the multiplications to
succeed, don't use this for setting the avg frame rate.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org 
Signed-off-by: Martin Storsjö <martin@martin.st> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c9eb5c9751 
								
							
								 
							
						 
						
							
							
								
								lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.  
							
							
								
							
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b050956334 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: avformat_find_stream_info set value for ret in case of oom  
							
							without it FFmpeg didn't display any error message when oom event occured
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ccf9211e29 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: avformat_find_stream_info fix a crash in case of oom  
							
							fixes ticket #2767 
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5312c319be 
								
							
								 
							
						 
						
							
							
								
								avformat_find_stream_info: fallback to timestamps in analyzeduration check in more cases  
							
							This fixes speex in rtmp
Fixes Ticket2409
the nellymoser in flv case actually needs larger analyzeduration. The code
previously just failed to calculate the duration
If this causes any problems, like premature analyze/probe end, please report!
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c7cfd4cce9 
								
							
								 
							
						 
						
							
							
								
								avformat_find_stream_info: use fps_dts as last resort to determine duration  
							
							Fixes long delay with some hardware generated h264 in ts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8ca5d277d8 
								
							
								 
							
						 
						
							
							
								
								avformat/utils: factor ff_find_last_ts() out of ff_gen_search()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d59ec0adbb 
								
							
								 
							
						 
						
							
							
								
								avformat_find_stream_info: move ret init down from flush codecs.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c5ddd75354 
								
							
								 
							
						 
						
							
							
								
								avformat_find_stream_info: Do not consider no streams an error in flush codecs  
							
							This should have no functional effect, but allows a cleaner diff when moving it
down
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c826c5698b 
								
							
								 
							
						 
						
							
							
								
								avformat_find_stream_info: try to preserve the error code  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ccba9535dc 
								
							
								 
							
						 
						
							
							
								
								av_find_stream_info: initialize ret  
							
							This should fix hypothetical corner cases where it might have never been initialized before use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2492f7774f 
								
							
								 
							
						 
						
							
							
								
								avformat: Print "Consider increasing the value for analzeduration and probesize" even more often  
							
							The sample from ticket #2691  currently does not trigger "Consider increasing
the value for analzeduration and probesize" because the audio streams are
only added after calling estimate_timings(). Attached patch moves the message
below this function call.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a9bbf59be7 
								
							
								 
							
						 
						
							
							
								
								cosmetics: Fix "dont" "wont" "doesnt" typos  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e59fb3f8b1 
								
							
								 
							
						 
						
							
							
								
								lavf: silence max_analyze_duration warning  
							
							This is part of normal operation with some formats. A warning should
indicate that something is wrong, and the documentation for AV_LOG_WARNING
says: "Something somehow does not look correct."
Since this message is most likely useful for debugging only, raise the
log level accordingly.
Plus-one-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f8ca8138f0 
								
							
								 
							
						 
						
							
							
								
								ff_gen_search: fix infinite loop  
							
							Fixes Ticket2639
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago