Justin Ruggles
743f07062a
lavfi: better channel layout negotiation
...
Allow substitution of channel pairs in the input for nearby channel pairs in
the output in order to get a closer match. Also weigh LFE channel mismatch
differently to favor matching the same layout without LFE over one less
channel with LFE.
12 years ago
Anton Khirnov
b5c8aa745e
vf_yadif: unset cur_buf on the input link.
...
The buffer is stored internally, so this prevents it from being unreffed
automatically.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Anton Khirnov
f431315a86
vf_overlay: ensure the overlay frame does not get leaked.
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
08fc1ad151
vf_overlay: prevent premature freeing of cur_buf
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Diego Biurrun
49c45a2624
avfilter: Fix printf format string conversion specifier
...
libavfilter/avfilter.c:224:9: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘int’ [-Wformat]
12 years ago
Ronald S. Bultje
3124886554
lavfi: place x86 inline assembly under HAVE_INLINE_ASM.
...
This allows compiling this code using compilers that do not understand
gcc-style inline assembly.
12 years ago
Anton Khirnov
a8a2271fe0
buffersrc: check ff_get_audio_buffer() for errors.
12 years ago
Anton Khirnov
8f3a3ce730
lavfi: check all ff_get_video_buffer() calls for errors.
12 years ago
Anton Khirnov
1dc4205018
lavfi: check all avfilter_ref_buffer() calls for errors.
12 years ago
Anton Khirnov
80e4ed279b
vf_select: avoid an unnecessary avfilter_ref_buffer().
12 years ago
Anton Khirnov
785fa50f0b
buffersrc: avoid creating unnecessary buffer reference
12 years ago
Anton Khirnov
02ac7311c8
lavfi: use avfilter_unref_bufferp() where appropriate.
12 years ago
Anton Khirnov
043800a968
vf_fps: add more error checks.
12 years ago
Anton Khirnov
d515e9c225
vf_fps: fix a memleak on malloc failure.
12 years ago
Anton Khirnov
3825b52688
lavfi: check all ff_start_frame/draw_slice/end_frame calls for errors
12 years ago
Anton Khirnov
d4f89906e3
lavfi: add error handling to end_frame().
12 years ago
Anton Khirnov
e9b992d035
lavfi: add error handling to draw_slice().
12 years ago
Anton Khirnov
ebc8d97481
lavfi: add error handling to start_frame().
12 years ago
Ronald S. Bultje
731fa116b4
yadif: use emms_c() instead of inline assembly for emms invocations.
12 years ago
Ronald S. Bultje
3db407038e
lavfi: use const for AVFilterPad declarations in all filters.
12 years ago
Anton Khirnov
4c9080a7ef
lavfi: unref AVFilterLink.out_buf in ff_end_frame().
...
This reduces code duplication and prevents stale pointers from remaining
on the link.
13 years ago
Anton Khirnov
07bad27810
lavfi: unref AVFilterLink.cur_buf in ff_end_frame().
...
This reduces code duplication and prevents stale pointers from remaining
on the link.
13 years ago
Anton Khirnov
533fd5b5b4
vsrc_testsrc: avoid an unnecessary avfilter_ref_buffer().
13 years ago
Anton Khirnov
5b50ae94e6
vf_slicify: clear AVFilterLink.cur_buf in start_frame().
...
The buffer is passed on to the next filter, so we shouldn't keep any
pointers to it.
13 years ago
Anton Khirnov
0393af4f0b
vf_settb: simplify start_frame().
...
Avoid pointless filter ref/unref. Just use the reference passed to
start_frame().
13 years ago
Anton Khirnov
9203fa0b32
vf_fieldorder: don't give up its own reference to the output buffer.
13 years ago
Anton Khirnov
f493c644cd
vf_pad: don't give up its own reference to the output buffer.
13 years ago
Anton Khirnov
ad8b6326aa
vf_overlay: don't access a buffer reference that's been given away.
13 years ago
Anton Khirnov
7155763b78
vf_drawtext: don't give up its own reference to the input buffer.
...
Directly forwarding the input buffer to the next filter means that
drawtext no longer owns any references to it and thus shouldn't refer to
it in any way.
13 years ago
Anton Khirnov
d19499c796
vf_gradfun: don't store two pointers to one AVFilterBufferRef.
13 years ago
Anton Khirnov
0fe010a36f
vf_delogo: don't store two pointers to one AVFilterBufferRef.
13 years ago
Anton Khirnov
51a8049be8
vf_aspect: clear AVFilterLink.cur_buf in start_frame().
...
The buffer is passed on to the next filter, so we shouldn't keep any
pointers to it.
13 years ago
Robert Nagy
b70d89a033
lavfi: add avfilter_unref_bufferp()
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Anton Khirnov
cd99146253
lavfi: add error handling to filter_samples().
13 years ago
Anton Khirnov
083d0f6be8
asplit: don't leak the input buffer.
13 years ago
Anton Khirnov
1ffb645662
af_resample: fix request_frame() behavior.
...
Make sure that an output frame has really been produced before returning
0.
13 years ago
Anton Khirnov
6f834293d3
af_asyncts: fix request_frame() behavior.
...
Make sure that an output frame has really been produced before returning
0.
13 years ago
Justin Ruggles
8ca08066fc
lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample format
...
Also make this the default value.
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
Mans Rullgard
7c29377b70
lavfi: reclassify showfiltfmts as a TESTPROG
...
This tool uses lavfi internal symbols not accessible in shared
libraries. TESTPROGS are linked statically to allow them use of
library internals not normally exported.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Diego Biurrun
2047e40e6e
Clarify Doxygen comment for FF_API_* #defines.
13 years ago
Diego Biurrun
1a068bfefd
cosmetics: Consistently use C-style comments with multiple inclusion guards
13 years ago
Diego Biurrun
09f211987c
misc typo and wording fixes
13 years ago
Mans Rullgard
fb93e61e2b
x86: lavfi: fix gradfun/yadif build with mmx/sse disabled
...
These functions are defined conditionally so any uses need to have
preprocessor guards.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
a87b17f328
vf_yadif: move x86 init code to x86/yadif.c
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
2f0accf103
vf_gradfun: move x86 init code to x86/gradfun.c
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Anton Khirnov
61d158c321
avfiltergraph: shut up uninitialized variable warning.
...
The warning silenced was:
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’:
libavfilter/avfiltergraph.c:500:13: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized]
13 years ago
Anton Khirnov
fd2784c3b5
af_join: initialize a variable to shut up gcc warning.
...
The warning silenced was:
libavfilter/af_join.c: In function ‘join_request_frame’:
libavfilter/af_join.c:451:9: warning: ‘nb_samples’ may be used uninitialized in this function [-Wuninitialized]
13 years ago