Those functions are only useful inside filters. It is better to not
support user filters until the API is more stable.
This breaks audio filtering API and ABI in theory, but since it's
unusable right now this shouldn't be a problem.
The additional parameters are just complicating the function interface.
Assume that a requested samples buffer will *always* have the format
specified in the requested link.
This breaks audio filtering API and ABI in theory, but since it's
unusable right now this shouldn't be a problem.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Remove AVFilterBufferRefAudioProps.size, and use nb_samples in its place
everywhere.
This is required as the size in the audio buffer may be aligned, so it
may not contain a well defined number of samples.
Also remove the useless planar parameter, which can be deduced from the
sample format.
This is technically an API and ABI break, but since the audio part of
lavfi is not usable now, this should not be a problem in practice.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
av_samples_alloc() behavior changed in bbb46f3ec, resulting in random
data filling the data[] and linesize[] arrays of the returned
AVFilterBufferRef, which was resulting in wrong behavior in case of code
checking on data[i] nullity.
In particular fixes crash in avfilter_filter_samples():
for (i = 0; samplesref->data[i]; i++)
memcpy(link->cur_buf->data[i], samplesref->data[i], samplesref->linesize[0]);
and correctly fills the linesize[] array for planar data.
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.
Fixes a few invalid shifts.
Signed-off-by: Mans Rullgard <mans@mansr.com>
A function name should tell what the function does rather than what
the function returns. This also avoids possible conflicts
(e.g. between a function and a public list of all supported formats),
and clarifies the code.
Breaks audio API/ABI, add a backward compatibility layer for video
API/ABI.
The additional parameters were never used and are complicating the
function interface. Also, they were inconsistent with the way the
video API works.
So this assumes that a requested samples buffer will have *always* the
format specified in the requested link.
This breaks audio filtering API and ABI.
void* pointer arithmetic semantics is undefined, use uint8_t* instead.
Also fix GCC warnings:
defaults.c: In function ‘set_common_formats’:
defaults.c:184: warning: pointer of type ‘void *’ used in arithmetic
defaults.c:189: warning: pointer of type ‘void *’ used in arithmetic
Link properties have to be checked after config_props() is called to
make sure everything is sane, so the default config_props() for output
links was redundant.
Also remove channel_layout check as it is now negotiated.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Remove AVFilterBufferRefAudioProps.size, and use nb_samples in
avfilter_get_audio_buffer() and avfilter_default_get_audio_buffer() in
place of size.
This is required as the size in the audio buffer may be aligned, so it
may not contain a well defined number of samples.
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavfilter/defaults.c: In function 'avfilter_default_get_audio_buffer':
libavfilter/defaults.c:129: warning: 'buf' is used uninitialized in this function
Originally committed as revision 26382 to svn://svn.ffmpeg.org/ffmpeg/trunk
More consistent with the rest of FFmpeg and sounds more natural to
English speaking people.
Originally committed as revision 26374 to svn://svn.ffmpeg.org/ffmpeg/trunk
This also allows to remove a linking dependency of libavfilter on
libavcodec.
Originally committed as revision 25789 to svn://svn.ffmpeg.org/ffmpeg/trunk
This is required for allowing a filter to use a time base different
from AV_TIME_BASE_Q, as it was previously assumed.
Originally committed as revision 25441 to svn://svn.ffmpeg.org/ffmpeg/trunk