ad45121d56 
								
							
								 
							
						 
						
							
							
								
								options: mark av_get_{int,double,q} as deprecated.  
							
							Convert last users to av_opt_get_*() counterparts. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2ea8a48083 
								
							
								 
							
						 
						
							
							
								
								avfilter/af_aresample: Check ff_all_* for allocation failures  
							
							Fixes: signal_sigabrt_7ffff70eccc9_498_divx502.avi with memlimit 1572864
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d70e503ebc 
								
							
								 
							
						 
						
							
							
								
								avfilter/af_aresample: remove unused variable  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								09024fe681 
								
							
								 
							
						 
						
							
							
								
								avfilter/af_aresample: Limit data per inserted packet  
							
							This avoids creating unwieldy large packets, which is allowed but
does not seem to be a good idea
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								97da68172a 
								
							
								 
							
						 
						
							
							
								
								avfilter/af_aresample: split flushing code out  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1dbc3e8ac8 
								
							
								 
							
						 
						
							
							
								
								avfilter/aresample: Check for memory alloc failure for out sample rates  
							
							Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3cc0f335fe 
								
							
								 
							
						 
						
							
							
								
								af_aresample: remove only use of array compound literals with non-const initializers in FFmpeg.  
							
							Some older compilers might have particular trouble with them,
and they do not really seem worth it to me.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								86b3435fc0 
								
							
								 
							
						 
						
							
							
								
								af_aresample: Fix timestamp of first padded PCM audio packet  
							
							Problem:
ffmpeg generated video file which had two audio packets with the same timestamp: last original audio packet and first padded audio packet.
Timestamp of first added audio packet by 'apad' fitler had the same value as last original audio packet. The problem was in 'aresample' fitler, which used next pts instead of current one.
As long as 'apad' and 'aresample' filters have separate mechanisms of timestamp calculation, they got the same values.
Command line:
ffmpeg -i <input_filename> -shortest -apad 512 -af asetnsamples=n=512 -b:a 1058400 -ac 1 -ar 44100 -async 0 -acodec pcm_s16le -sn -f matroska -y <output_file>
Fix:
Call swr_next_pts() function before swr_convert()
Tested:
FATE tests passed.
Fix has been tested in our Transcoder regression framework on ~10k test videos. It's about ~500k transcodes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ea6331b2c6 
								
							
								 
							
						 
						
							
							
								
								avfilter/af_aresample: Calculate output buffer size more precisely.  
							
							Fixes accumulation of data in case of significant silence injections
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b211607b5c 
								
							
								 
							
						 
						
							
							
								
								avfilter: various cosmetics  
							
							Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ec0e0eb4c1 
								
							
								 
							
						 
						
							
							
								
								avfilter/vf_scale+aresample: minor simpification  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4f43e9b4af 
								
							
								 
							
						 
						
							
							
								
								avfilter/aresample: use init_dict system and set child AVOption context correctly  
							
							Parts of this commit are based on: 4fa1f52e 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								cd5f50a255 
								
							
								 
							
						 
						
							
							
								
								avfilter: avoid direct access to AVFrame.channels  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c82bb2815b 
								
							
								 
							
						 
						
							
							
								
								lavfi/aresample: raise filter_frame() error.  
							
							
								
							
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3d2adeb6f8 
								
							
								 
							
						 
						
							
							
								
								lavfi/af_aresample: fix info log for unknown layouts.  
							
							
								
							
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2bd104c72a 
								
							
								 
							
						 
						
							
							
								
								lavfi/af_aresample: fix layout consistency check.  
							
							If the channel layout is unknown, lswr will internally use
the default one for the corresponding number of channels. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b00502457a 
								
							
								 
							
						 
						
							
							
								
								lavfi/af_aresample: accept unknown channel layouts.  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e06c147581 
								
							
								 
							
						 
						
							
							
								
								lavfi/aresample: fix style  
							
							Improve overall consistency/improve readability. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								238edd2fe3 
								
							
								 
							
						 
						
							
							
								
								lavfi: add a channels field to AVFilterLink.  
							
							Also: fix af_pan and af_aresample, that forgot to update
audio->channels. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								616e6ffac6 
								
							
								 
							
						 
						
							
							
								
								aresample: increase n_out buffer size a bit to reduce delay in some corner cases  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2d9d444051 
								
							
								 
							
						 
						
							
							
								
								lavfi: convert remaining input/output list compound literals to named objects.  
							
							This is following 568c70e79e 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								cd7febd33f 
								
							
								 
							
						 
						
							
							
								
								lavfi: replace filter_samples by filter_frame  
							
							Based on patch by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8d231e37af 
								
							
								 
							
						 
						
							
							
								
								af_aresample: consistently use ROUNDED_DIV  
							
							This fixes issues with negative timestamps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4b5a12a2cb 
								
							
								 
							
						 
						
							
							
								
								af_aresample: fix rounding of negative timestamps  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								014058abea 
								
							
								 
							
						 
						
							
							
								
								af_aresample: check ff_get_audio_buffer() failure  
							
							Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c44a028e19 
								
							
								 
							
						 
						
							
							
								
								af_aresample: allocate at least 1 sample buffer. Fix null ptr dereference.  
							
							Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1acd2f6ba7 
								
							
								 
							
						 
						
							
							
								
								Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.h  
							
							Also remove it in once case when it is not needed.
Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9ba2484ece 
								
							
								 
							
						 
						
							
							
								
								af_aresample: fix leak on alloc failure  
							
							Fixes CID733798
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b5bea2f960 
								
							
								 
							
						 
						
							
							
								
								lavfi/aresample: set buffer properties after copy.  
							
							The aresample filter changes the format, layout and/or sample rate,
it can not copy them blindly from its input.
Related to trac ticket #1671 . 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								fda968aa8f 
								
							
								 
							
						 
						
							
							
								
								lavfi: decrease logging level of message showing initial parameters  
							
							Reduce log clutter, consistent with 1a49a169eb 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								972cad77fa 
								
							
								 
							
						 
						
							
							
								
								lavfi: remove unnecessary inclusion of libavcodec/avcodec.h in avfilter.h  
							
							libavfilter API was designed in order to be clarly distinguished from the
libavcodec API, including avcodec.h in avfilter.h is not going to help to
stick to this principle.
The inclusion of libavutil/audioconvert.h in many files was required
because avcodec.h includes audioconvert.h.
libavfilter/avcodec.h is where the lavc/lavfi interface should be
entirely placed. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								62975afa68 
								
							
								 
							
						 
						
							
							
								
								af_aresample: fix sample_rate type.  
							
							should fix fate failures on 32bit x86 linux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c9e183b490 
								
							
								 
							
						 
						
							
							
								
								lavfi: update some deprecated functions  
							
							Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								be97675e6c 
								
							
								 
							
						 
						
							
							
								
								af_aresample: fix pts, they where off by a packet in the -async >0 case.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								411689b5e1 
								
							
								 
							
						 
						
							
							
								
								af_aresample: fix request_frame()  
							
							Fixes part of Ticket1341
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b0b7a89b07 
								
							
								 
							
						 
						
							
							
								
								lavfi/aresample: print channel layouts and formats along with the rate.  
							
							
								
							
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								21d8a80e30 
								
							
								 
							
						 
						
							
							
								
								af_aresample: use new swr API to pass and compensate PTS  
							
							This code is not only much more powerfull its also simpler
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								087d09b6d5 
								
							
								 
							
						 
						
							
							
								
								af_aresample: allocate a larger buffer so accumulated data can be returned quicker  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e17a039647 
								
							
								 
							
						 
						
							
							
								
								af_aresample: use extended_data  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								96ac8663de 
								
							
								 
							
						 
						
							
							
								
								af_aresample: Consider the swresample delay during calculating timestamps.  
							
							The difference from this should be pretty small.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6ba692f8a7 
								
							
								 
							
						 
						
							
							
								
								af_aresample: fix rounding that led to sample accumulation in the buffers.  
							
							This fixes a regression that apparently was missed when switching to the
in af resampler
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								db6ef054f5 
								
							
								 
							
						 
						
							
							
								
								af_aresample: 10l fix, wrong timebase for next_pts.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								847943bc51 
								
							
								 
							
						 
						
							
							
								
								aresample: add code to flush the internal swr buffer.  
							
							Inspired-by code from af_resample.c written by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b3e1b95afa 
								
							
								 
							
						 
						
							
							
								
								aresample: check return code of swr_convert()  
							
							Issue found by comparing af_resample.c and af_aresample.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b13d39bd81 
								
							
								 
							
						 
						
							
							
								
								av_aresample: Allow changing sample format and channel layout as well  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e3c6b61263 
								
							
								 
							
						 
						
							
							
								
								af_aresample: support all swresample parameters.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								47c2e52bc6 
								
							
								 
							
						 
						
							
							
								
								af_aresample: fix typo in query formats  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								efdc895fbd 
								
							
								 
							
						 
						
							
							
								
								lavfi: fix pts rescaling in the resampler  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								75492cce8e 
								
							
								 
							
						 
						
							
							
								
								lavfi: fix resample with differing formats  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4522df52aa 
								
							
								 
							
						 
						
							
							
								
								lavfi: remove audio.h include from avfilter.h.  
							
							avfilter.h is a public header and the unexported audio.h header contains
only internal prototypes. 
							
						 
						13 years ago