summaryrefslogtreecommitdiff
path: root/libavfilter/af_aresample.c
Commit message (Collapse)AuthorAge
* avfilter: do not leak AVFrame on failed buffer allocationPaul B Mahol2017-06-24
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter: don't anonymously typedef structsPaul B Mahol2017-05-13
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter: do not use AVFrame accessorMuhammad Faiz2017-04-23
| | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* avfilter/all: propagate errors of functions from avfilter/formatsGanesh Ajjanagadde2015-10-14
| | | | | | | | | | | | | | | | | | Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM). This propagates the return values. All of these were found by using av_warn_unused_result, demonstrating its utility. Tested with FATE. I am least sure of the changes to avfilter/filtergraph, since I don't know what/how reduce_format is intended to behave and how it should react to errors. Fixes: CID 1325680, 1325679, 1325678. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Previous version Reviewed-by: Nicolas George <george@nsup.org> Previous version Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/af_aresample: remove looping on request_frame().Nicolas George2015-10-07
|
* options: mark av_get_{int,double,q} as deprecated.Ronald S. Bultje2015-08-18
| | | | Convert last users to av_opt_get_*() counterparts.
* avfilter/af_aresample: Check ff_all_* for allocation failuresMichael Niedermayer2015-07-17
| | | | | | | 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>
* avfilter/af_aresample: remove unused variableMichael Niedermayer2014-11-06
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/af_aresample: Limit data per inserted packetMichael Niedermayer2014-11-04
| | | | | | | 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>
* avfilter/af_aresample: split flushing code outMichael Niedermayer2014-11-04
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/aresample: Check for memory alloc failure for out sample ratesDerek Buitenhuis2014-10-02
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* af_aresample: remove only use of array compound literals with non-const ↵Reimar Döffinger2013-12-30
| | | | | | | | | 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>
* af_aresample: Fix timestamp of first padded PCM audio packetAlex Sukhanov2013-11-15
| | | | | | | | | | | | | | | | | | | | 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>
* avfilter/af_aresample: Calculate output buffer size more precisely.Michael Niedermayer2013-11-06
| | | | | | Fixes accumulation of data in case of significant silence injections Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavfi: do not export the filters from shared objects Conflicts: libavfilter/af_amix.c libavfilter/af_anull.c libavfilter/asrc_anullsrc.c libavfilter/f_select.c libavfilter/f_settb.c libavfilter/split.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_colorbalance.c libavfilter/vf_copy.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_drawbox.c libavfilter/vf_format.c libavfilter/vf_framestep.c libavfilter/vf_frei0r.c libavfilter/vf_hflip.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_null.c libavfilter/vf_overlay.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_vflip.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter: various cosmeticsPaul B Mahol2013-09-12
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/vf_scale+aresample: minor simpificationMichael Niedermayer2013-08-16
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/aresample: use init_dict system and set child AVOption context ↵Michael Niedermayer2013-04-11
| | | | | | | | correctly Parts of this commit are based on: 4fa1f52e Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter: avoid direct access to AVFrame.channelsMichael Niedermayer2013-03-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/aresample: raise filter_frame() error.Clément Bœsch2013-03-13
|
* Merge commit '7e350379f87e7f74420b4813170fe808e2313911'Michael Niedermayer2013-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7e350379f87e7f74420b4813170fe808e2313911': lavfi: switch to AVFrame. Conflicts: doc/filters.texi libavfilter/af_ashowinfo.c libavfilter/audio.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersink.c libavfilter/buffersrc.c libavfilter/buffersrc.h libavfilter/f_select.c libavfilter/f_setpts.c libavfilter/fifo.c libavfilter/split.c libavfilter/src_movie.c libavfilter/version.h libavfilter/vf_aspect.c libavfilter/vf_bbox.c libavfilter/vf_blackframe.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fieldorder.c libavfilter/vf_fps.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hqdn3d.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c libavfilter/vf_vflip.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavfilter/yadif.h Following are notes about the merge authorship and various technical details. Michael Niedermayer: * Main merge operation, notably avfilter.c and video.c * Switch to AVFrame: - afade - anullsrc - apad - aresample - blackframe - deshake - idet - il - mandelbrot - mptestsrc - noise - setfield - smartblur - tinterlace * various merge changes and fixes in: - ashowinfo - blackdetect - field - fps - select - testsrc - yadif Nicolas George: * Switch to AVFrame: - make rawdec work with refcounted frames. Adapted from commit 759001c534287a96dc96d1e274665feb7059145d by Anton Khirnov. Also, fix the use of || instead of | in a flags check. - make buffer sink and src, audio and video work all together Clément Bœsch: * Switch to AVFrame: - aevalsrc - alphaextract - blend - cellauto - colormatrix - concat - earwax - ebur128 - edgedetect - geq - histeq - histogram - hue - kerndeint - life - movie - mp (with the help of Michael) - overlay - pad - pan - pp - pp - removelogo - sendcmd - showspectrum - showwaves - silencedetect - stereo3d - subtitles - super2xsai - swapuv - thumbnail - tile Hendrik Leppkes: * Switch to AVFrame: - aconvert - amerge - asetnsamples - atempo - biquads Matthieu Bouron: * Switch to AVFrame - alphamerge - decimate - volumedetect Stefano Sabatini: * Switch to AVFrame: - astreamsync - flite - framestep Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com> Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/af_aresample: fix info log for unknown layouts.Nicolas George2013-02-28
|
* lavfi/af_aresample: fix layout consistency check.Nicolas George2013-02-28
| | | | | If the channel layout is unknown, lswr will internally use the default one for the corresponding number of channels.
* lavfi/af_aresample: accept unknown channel layouts.Nicolas George2013-01-26
|
* lavfi/aresample: fix styleStefano Sabatini2012-12-26
| | | | Improve overall consistency/improve readability.
* lavfi: add a channels field to AVFilterLink.Nicolas George2012-12-20
| | | | | Also: fix af_pan and af_aresample, that forgot to update audio->channels.
* aresample: increase n_out buffer size a bit to reduce delay in some corner casesMichael Niedermayer2012-12-13
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: convert remaining input/output list compound literals to named objects.Clément Bœsch2012-11-28
| | | | This is following 568c70e79ee267426c15ef4603c69703f6a5884a.
* lavfi: replace filter_samples by filter_frameMichael Niedermayer2012-11-28
| | | | | Based on patch by Anton Khirnov Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* af_aresample: consistently use ROUNDED_DIVMichael Niedermayer2012-11-26
| | | | | | This fixes issues with negative timestamps Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* af_aresample: fix rounding of negative timestampsMichael Niedermayer2012-11-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* af_aresample: check ff_get_audio_buffer() failureMichael Niedermayer2012-11-24
| | | | | | Fixes null pointer dereference Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* af_aresample: allocate at least 1 sample buffer. Fix null ptr dereference.Michael Niedermayer2012-11-19
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.hPaul B Mahol2012-11-13
| | | | | | Also remove it in once case when it is not needed. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* af_aresample: fix leak on alloc failureMichael Niedermayer2012-10-11
| | | | | Fixes CID733798 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/aresample: set buffer properties after copy.Nicolas George2012-09-13
| | | | | | | 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.
* lavfi: decrease logging level of message showing initial parametersStefano Sabatini2012-07-15
| | | | Reduce log clutter, consistent with 1a49a169eb74a97.
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mss3: use standard zigzag table mss3: split DSP functions that are used in MTS2(MSS4) into separate file motion-test: do not use getopt() tcp: add initial timeout limit for incoming connections configure: Change the rdtsc check to a linker check avconv: propagate fatal errors from lavfi. lavfi: add error handling to filter_samples(). fate-run: make avconv() properly deal with multiple inputs. asplit: don't leak the input buffer. af_resample: fix request_frame() behavior. af_asyncts: fix request_frame() behavior. libx264: support aspect ratio switching matroskadec: honor error_recognition when encountering unknown elements. lavr: resampling: add support for s32p, fltp, and dblp internal sample formats lavr: resampling: add filter type and Kaiser window beta to AVOptions lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample format lavr: mix: validate internal sample format in ff_audio_mix_init() Conflicts: ffmpeg.c ffplay.c libavcodec/libx264.c libavfilter/audio.c libavfilter/split.c libavformat/tcp.c tests/fate-run.sh Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a'Michael Niedermayer2012-06-26
| | | | | | | | | | | | | | | | | | | | | | | * commit 'a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a': lavfi: remove 'opaque' parameter from AVFilter.init() mov: do not try to read total disc/track number if data atom is too short. avconv: fix -force_key_frames dxva2_h264: fix signaling of mbaff frames x86: fft: elf64: fix PIC build Conflicts: ffmpeg.c libavcodec/v210dec.h libavfilter/asrc_anullsrc.c libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_overlay.c libavfilter/vsrc_color.c libavfilter/vsrc_testsrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: remove unnecessary inclusion of libavcodec/avcodec.h in avfilter.hStefano Sabatini2012-06-25
| | | | | | | | | | | | 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.
* af_aresample: fix sample_rate type.Michael Niedermayer2012-06-24
| | | | | | should fix fate failures on 32bit x86 linux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: x86: Only use optimizations with cmov if the CPU supports the instruction x86: Add CPU flag for the i686 cmov instruction x86: remove unused inline asm macros from dsputil_mmx.h x86: move some inline asm macros to the only places they are used lavfi: Add the af_channelmap audio channel mapping filter. lavfi: add join audio filter. lavfi: allow audio filters to request a given number of samples. lavfi: support automatically inserting the fifo filter when needed. lavfi/audio: eliminate ff_default_filter_samples(). Conflicts: Changelog libavcodec/x86/h264dsp_mmx.c libavfilter/Makefile libavfilter/allfilters.c libavfilter/avfilter.h libavfilter/avfiltergraph.c libavfilter/version.h libavutil/x86/cpu.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: update some deprecated functionsPaul B Mahol2012-06-16
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* af_aresample: fix pts, they where off by a packet in the -async >0 case.Michael Niedermayer2012-05-26
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* af_aresample: fix request_frame()Michael Niedermayer2012-05-26
| | | | | | Fixes part of Ticket1341 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/aresample: print channel layouts and formats along with the rate.Clément Bœsch2012-05-25
|
* af_aresample: use new swr API to pass and compensate PTSMichael Niedermayer2012-05-19
| | | | | | This code is not only much more powerfull its also simpler Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* af_aresample: allocate a larger buffer so accumulated data can be returned ↵Michael Niedermayer2012-05-19
| | | | | | quicker Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* af_aresample: use extended_dataMichael Niedermayer2012-05-19
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* af_aresample: Consider the swresample delay during calculating timestamps.Michael Niedermayer2012-05-18
| | | | | | The difference from this should be pretty small. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>