Paul B Mahol
20a3c4f606
avfilter: forward status back in some filters that missed it
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
8dff6c2844
avfilter/af_amix: add weights option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
63826a0b82
avfilter/af_amix: make use of av_asprintf()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
99b6e68441
avfilter/af_amix: do not request samples if inlink reached EOF
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
7f5c655833
avfilter/af_amix: simplify const entries for duration in amix_options[]
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
15e9c4afdc
avfilter/af_amix: switch to activate
Really fixes hangs and infinite loops.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
1e7ce6d925
avfilter/af_amix: check ff_insert_inpad() for failure
7 years ago
Derek Buitenhuis
b198e09138
af_amix: Add missing error check
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years ago
Paul B Mahol
478a1949d9
avfilter/af_amix: fix possible hang
Fixes #6424 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
75b854adbd
avfilter/af_amix: add double sample format support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Warblefly
47ccefac21
libavfilter/af_amix.c Increase sources from 32 to 1024
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Paul B Mahol
b257266ee8
avfilter/af_amix: use ff_all_channel_counts() instead of ff_all_channel_layouts()
Adds support for filtering frames with unknown channel layouts.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Michael Niedermayer
3a3265899b
avfilter/af_amix: make independent of the channel layout
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
abc957e896
avfilter/af_amix: dont fail if there are no samples in output_frame()
Fixes Ticket5326
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
89bbf01978
lavfi/af_amix: fix memory leak
Recent commits 6aaac24d72
and
3835554bf8
made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.
This commit addresses the issue of possible resource leaks when some intermediate
call fails.
Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.
Fixes: CID 1250334.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Nicolas George
a08fb3983f
lavfi/af_amix: mostly fix scheduling.
9 years ago
Ganesh Ajjanagadde
6aaac24d72
avfilter/all: propagate errors of functions from avfilter/formats
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>
9 years ago
Paul B Mahol
a0854c084e
avfilter: handle error in query_formats() in bunch of filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Michael Niedermayer
34bddf443c
avfilter/af_amix: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Paul B Mahol
145a84717b
lavfi: check av_strdup() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Michael Niedermayer
aa97223f14
avfilter/af_amix: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Reynaldo H. Verdejo Pinochet
a9ea79bb49
libavfilter/af_amix: avoid derreferencing possible null
ff_all_channel_layouts() might return null on alloc failure.
Fixes CID1241516
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
10 years ago
Michael Niedermayer
81a663f49e
Drop remaining unneeded != NULL
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
f240740712
avfilter/af_amix: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
cd43ca0443
lavfi: do not export the filters from shared objects
11 years ago
Paul B Mahol
b211607b5c
avfilter: various cosmetics
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Thilo Borgmann
d814a839ac
Reinstate proper FFmpeg license for all files.
11 years ago
Diego Biurrun
093804a93c
avfilter: Add av_cold attributes to init/uninit functions
12 years ago
Anton Khirnov
d69a4177b9
lavfi: remove now unused args parameter from AVFilter.init
Conflicts:
libavfilter/avfilter.c
libavfilter/vf_drawtext.c
libavfilter/vf_lut.c
libavfilter/vf_select.c
libavfilter/vf_setpts.c
libavfilter/vsrc_color.c
libavfilter/vsrc_movie.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
7cdd737ba8
lavfi: mark filters with dynamic number of inputs or outputs with special flags
This will be useful in avtools in the following commits.
Any other caller might also want to know this information.
12 years ago
Anton Khirnov
c43a7ecad9
lavfi: remove now unused args parameter from AVFilter.init
12 years ago
Anton Khirnov
ac20e3ab8e
af_amix: switch to an AVOptions-based system.
12 years ago
Anton Khirnov
7e350379f8
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
12 years ago
Michael Niedermayer
cd7febd33f
lavfi: replace filter_samples by filter_frame
Based on patch by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
565e4993c6
lavfi: merge start_frame/draw_slice/end_frame
Any alleged performance benefits gained from the split are purely
mythological and do not justify added code complexity.
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
Also reorder some other #include when applicable.
12 years ago
Mans Rullgard
568c70e79e
lavfi: convert input/ouput list compound literals to named objects
A number of compilers, for example those from TI and IBM, choke on
these initialisers. The current style is also quite ugly.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Janne Grunau
8501c09868
af_amix: prevent memory leak on error path
Fixes CID732272.
12 years ago
Mans Rullgard
1fce361d70
lavfi: replace empty input/output lists with null pointers
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Martin Storsjö
c7b610aa0b
avopt: Explicitly store float/double option defaults in .dbl
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
124134e424
avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Stefano Sabatini
42d621d131
lavfi: add priv class to filter definitions and flags to filter internal options
This allows the iteration callbacks to discover the internal class and
options, and show them when required.
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Clément Bœsch
cc650cf029
Remove "Error parsing options string [...]" messages.
This reduces from 3 to 2 messages for the same syntax error in ffprobe,
and from 4 to 3 in filters.
12 years ago
Anton Khirnov
cd99146253
lavfi: add error handling to filter_samples().
13 years ago
Anton Khirnov
b7558ac293
af_amix: avoid spurious EAGAIN.
Input on/off state can change in request_samples(), which can result in
a state where only the first input is active. get_available_samples()
will then return 0, and request_frame() will fail with EAGAIN even
though there is data on the single active input.
Take this into account and check the number of active inputs again after
calling request_samples().
13 years ago
Anton Khirnov
54bf88e65f
af_amix: return AVERROR(EAGAIN) when request_frame didn't produce output.
0 should only be returned when there was at least one output frame.
13 years ago
Anton Khirnov
428b369804
af_amix: only consider negative return codes as errors.
13 years ago
Anton Khirnov
422008ac63
amix: fix format specifier for AVFilterLink.sample_rate.
It is a plain int now.
13 years ago