Simon Thelen
7cbb52ecab
libavfilter/formats: Fix parsing of channel specifications with a trailing 'c'.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
50ee17340b
avfilter/formats: Add test for ff_parse_channel_layout()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Clément Bœsch
545b0dd6aa
avfilter/formats: proper error handling in ff_set_common_*() functions
10 years ago
Clément Bœsch
f861d9b2c6
avfilter/formats: proper error handling in ff_channel_layouts_ref() and ff_formats_ref()
Also make sure the allocation and its check are properly done.
10 years ago
Clément Bœsch
93d9ce7cec
avfilter/formats: use av_realloc_array in ADD_FORMAT()
10 years ago
Clément Bœsch
38fb183b12
avfilter/formats: remove unused COPY_INT_LIST() macro
This macro is unused since 247fa6c27c
.
10 years ago
Vittorio Giovara
c3bd1d60af
formats: Check memory allocations
10 years ago
Michael Niedermayer
b9ffafbfcc
avfilter/formats: Alloc NULL fmts in SET_COMMON_FORMATS()
This avoids null pointer dereferences in case memory allocation has failed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
75819fafd8
avfilter/formats: free the correct pointer in ADD_FORMAT()
Also only free it when it was not previously allocated to return to the
state prior to the failing function call
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
863ee8a855
lavfi: clean memory on error in ADD_FORMAT()
CC: libav-stable@libav.org
Bug-Id: CID 1250334
10 years ago
Michael Niedermayer
0a7ad6bf51
avfilter/formats: Use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1853e2cba9
avfilter/formats: Avoid using non public AV_SAMPLE_FMT_NB
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
64fb19cc99
avfilter/formats: Avoid using non public AV_PIX_FMT_NB
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
7cc4c9f32f
lavfi/formats: avoid using AV_{PIX,SAMPLE}_FMT_NB
Thatt hardcodes the number of formats into lavfi and will break when a
shared lavu is updated, adding new formats.
11 years ago
Nicolas George
6e2473edfd
lavfi: parsing helper for unknown channel layouts.
Make ff_parse_channel_layout() accept unknown layouts too.
11 years ago
Michael Niedermayer
247fa6c27c
avfilter: remove ff_copy_int*_list
The functions are unused
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
b01f6041f4
lavfi: rename AVFilterFormats.format_count to nb_formats
This is more consistent with naming in the rest of Libav.
12 years ago
Michael Niedermayer
c7c71f95f8
replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
e6c4ac7b5f
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
12 years ago
Nicolas George
f810ca63f8
lavfi: detect merge failure for unknown layouts.
Detect when filtering known layouts from an explicit list
results in an empty list.
Fix erratic behavior.
12 years ago
Nicolas George
e568d432b1
lavfi/formats: reindent after last commit.
12 years ago
Nicolas George
2d98dd3d14
lavfi: fix merging of formats and clarify exception.
The following commit:
b97d61f
avfilter/ff_merge_formats: only merge if doing so does not loose chroma or alpha
introduced an exception to avoid lossy conversions.
Add a comment to explain the logic.
Fix the call to avoid applying it on audio formats.
12 years ago
Michael Niedermayer
b97d61f924
avfilter/ff_merge_formats: only merge if doing so does not loose chroma or alpha
Fixes Ticket1280
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
b6b2f3433c
lavfi: implement ff_query_formats_all().
12 years ago
Nicolas George
7bb98b753b
lavfi: implement ff_all_channel_counts().
12 years ago
Nicolas George
b6afb2dde1
lavfi: support unknown channel layouts.
12 years ago
Michael Niedermayer
0efcf16a3e
replace av_log(0, by av_log(NULL,
The first parameter is a pointer and NULL is more correct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
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>
12 years ago
Anton Khirnov
59ee9f78b0
lavfi: do not use av_pix_fmt_descriptors directly.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
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
Anton Khirnov
1961e46c15
lavfi: remove disabled FF_API_FILTERS_PUBLIC cruft
13 years ago
Stefano Sabatini
720ec62012
lavfi: drop deprecated and disabled packing API
It was deprecated and removed after the recent 2->3 major bump.
13 years ago
Paul B Mahol
c9e183b490
lavfi: update some deprecated functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Anton Khirnov
9baeff9506
lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
This is more consistent with naming in the rest of Libav.
13 years ago
Anton Khirnov
d625136877
lavfi: add channelsplit audio filter.
13 years ago
Andrew Wason
c527027c27
aconvert filter needs to configure samplerates
I changed the *_set_common_* functions to only set unset formats, then
added a wrapper that calls them after the filters query_formats.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
b74a1da49d
lavfi: make formats API private on next bump.
It is only useful inside filters and we don't allow user filters for
now.
13 years ago
Anton Khirnov
43c7a01e98
lavfi: remove avfilter_default_* from public API on next bump.
Those functions are only useful inside filters. It is better to not
support user filters until the API is more stable.
13 years ago
Nicolas George
5ac9ef6493
avfilter: make AVFilterFormats compatible with libav.
The list goes back to being simple integers,
and avfilter_make_format64_list is fixed to work
with the correct structure directly.
13 years ago
Clément Bœsch
64ff8a7670
lavfi: rename all_channel_layouts.h to all_channel_layouts.inc.
all_channel_layouts.h is not a real header file and breaks make checkheaders.
13 years ago
Michael Niedermayer
3448404a70
libavfilter: add ff_parse_time_base()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
4d4098da00
lavfi: drop planar/packed negotiation support
The planar/packed switch and the packing_formats list is no longer
required, since the planar/packed information is now stored in the sample
format enum.
This is technically a major API break, possibly it should be not too
painful as we marked the audio filtering API as unstable.
13 years ago
Anton Khirnov
4c64fed37c
lavfi: move formats-related functions from default.c to formats.c
It's more convenient to have them all in one file.
13 years ago
Anton Khirnov
5775a1832c
lavfi: add types and functions for channel layout/samplerate negotiation
13 years ago
Mina Nagy Zaki
11b6a82412
lavfi: avfilter_merge_formats: handle case where inputs are same
This fixes a double-free crash if lists are the same due to the two
merge_ref() calls at the end of the (useless) merging that happens.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Anton Khirnov
d4ac703c7f
lavfi/formats: use sizeof(var) instead of sizeof(type).
13 years ago
Alex Converse
7181c4edee
cosmetics: Remove extra newlines at EOF
13 years ago
Stefano Sabatini
386aee6864
sink_buffer: copy list of provided formats in the context
A list of formats may have been dynamically created by the calling code,
and thus should not be referenced by the sink buffer context.
Avoid possible invalid data reference.
13 years ago
Michael Niedermayer
248bb81ebc
avfilter: Error out from avfilter_merge_formats() when there are duplicates
instead of trying to continue.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago