Commit Graph
100 Commits
Author SHA1 Message Date
Nicolas George e9f45a833d lavfi/vf_tile: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 8c6c811b21 lavfi/avf_concat: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George befbcc374d lavfi: add common code to handle options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George cdd78a65f4 lavf/vobsub: free index pseudo-packet. 2013-03-20 21:13:55 +01:00
Nicolas George 6a90f6d789 ffmpeg: fix freeing of sub2video frame. 2013-03-20 21:13:55 +01:00
Nicolas George 21b092de7c lavfi: add sine audio source. 2013-03-20 21:04:28 +01:00
Nicolas George 8d928a9d99 lavu/opt: add AV_OPT_TYPE_DURATION. 2013-03-20 21:04:28 +01:00
Nicolas George 68fb7e260b lavfi/concat: fix silence duration computation.
Inside send_silence(), delta_ts was used inconsistently:
sometimes as the new value, sometimes as the old value.

Consistently use it as the new value, and add an argument
to know the last segment duration.
2013-03-20 20:59:45 +01:00
Nicolas George de1a71595d lavf/concatdec: support seeking. 2013-03-20 20:59:24 +01:00
Nicolas George a964d6a8a2 lavu/frame: use channels rather than channel_layout. 2013-03-20 13:35:24 +01:00
Nicolas George 0d09aa9d8e lavf: avformat_seek_file(): validate stream_index. 2013-03-20 13:35:24 +01:00
Nicolas George de1568a452 lavf/concatdec: fix possible leak in case of malloc failure.
Fix CID 747737.
2013-03-20 13:35:24 +01:00
Nicolas George 5eb273b2e7 lavfi/buffersink: check av_frame_ref() failure. 2013-03-20 13:35:24 +01:00
Nicolas George ec7fc7b7d1 fate: add a test for -filter_complex / -lavfi without input. 2013-03-17 16:24:43 +01:00
Nicolas George 40ea006b76 ffmpeg: make -lavfi an alias for -filter_complex. 2013-03-17 16:24:43 +01:00
Nicolas George 7e6c67dd24 lavfi/buffersink: fix header.
Move non-obsolete functions, structures and constants outside
the scope of "#if FF_API_AVFILTERBUFFER".

Add attribute_deprecated to av_buffersink_get_buffer_ref()
and av_buffersink_poll_frame().

Add doxygen for av_buffersink_get_frame_flags().
2013-03-17 12:31:25 +01:00
Nicolas George a5149607df lavfi/buffersrc: disable deprecated warnings. 2013-03-17 12:31:24 +01:00
Nicolas George f29c28a884 lavfi/buffersrc: check channel count changes. 2013-03-17 12:31:24 +01:00
Nicolas George 3cd342636f lavfi/buffersrc: set channel layout if it is known.
Introduced in 01649c7, lost in the API change.
2013-03-17 11:59:51 +01:00
Nicolas George 639a9e21a6 ffmpeg_opt: add OPT_INPUT to -fix_sub_duration and -canvas_size. 2013-03-16 17:20:19 +01:00
Nicolas George b90912be68 lavd/lavfi: upgrade to AVFrame.
Fix a memory leak because the compat implementation of
AV_BUFFERSINK_FLAG_PEEK is not identical to the previous one.
2013-03-15 20:46:27 +01:00
Nicolas George 7a71544f9d lavfi/graphdump: fix output for unknown layouts. 2013-03-14 20:52:50 +01:00
Nicolas George 0eb56a085d ffmpeg: add OPT_INPUT to -guess_layout_max. 2013-03-14 19:32:22 +01:00
Nicolas George da397173df ffmpeg: add OPT_OUTPUT to -to option.
Fix trac ticket #2355.
2013-03-14 19:32:22 +01:00
Nicolas GeorgeandAnton Khirnov be40d6cc2b rawdec: fix a typo -- || instead of |
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-13 09:13:54 +01:00
Nicolas George 684a264638 configure: remove selection of ff(a)buffersink.
buffersink is enabled unconditionally.
2013-03-12 23:31:07 +01:00
Nicolas George c14a8c834c lavfi/buffersink: schedule removing the "ff" variants.
They are no longer needed since there is no incompatible
ABI version.
2013-03-12 23:31:07 +01:00
Nicolas George ceac5c54dd Remove references to the "ff" variant of buffersink. 2013-03-12 23:31:07 +01:00
Nicolas George 9a2688826d lavfi/buffersink: rename filter structures.
Reduce the diff with the fork.
2013-03-12 23:31:07 +01:00
Nicolas George b52421940f lavf: add AV_ to two remaining CODEC_ID_*. 2013-03-12 16:21:22 +01:00
Nicolas George 73b40e2eb6 lavfi/buffersink: move the filter structures at the end.
Also apply a few cosmetic fixes (spaces, trailing comma) to
help match them with the fork's implementation.
2013-03-11 19:00:49 +01:00
Nicolas George de54a96aa8 lavfi/buffersink: implement av_buffersink_get_samples().
Note: the implementation could be more efficient, but at
the cost of more diff.

Most of the code from the following commit:

commit a2cd9be212
Author: Anton Khirnov <anton@khirnov.net>
Date:   Fri May 4 19:22:38 2012 +0200

    lavfi: add an audio buffer sink.

Adapted to call av_buffersink_get_frame_flags() instead of
accessing the frame directly.
2013-03-10 19:39:25 +01:00
Nicolas George b71db3f38e lavfi/buffersrc: do not dereference NULL frame.
frame = NULL is used to indicate EOF.
2013-03-10 17:05:55 +01:00
Nicolas George 03b87fe5e3 lavfi: rename sink_buffer.c into buffersink.c. 2013-03-10 17:05:55 +01:00
Nicolas George 3add5dc88e lavfi: remove buffersink.c.
It only contains merge conflicts leftovers.
The real code is in sink_buffer.c.
2013-03-10 17:05:55 +01:00
Nicolas George fa41f7ecd6 lavfi/sink_buffer: move stuff to reduce the diff.
Note: av_buffersink_get_samples() is not yet implemented,
abuffersink is not yet a drop-in replacement of the fork's
abuffersink.
2013-03-10 17:05:46 +01:00
Nicolas George fb14e37dd0 ffmpeg: re-enable use of buffersrc flags.
AV_BUFFERSRC_FLAG_PUSH is necessary to detect closed streams.
2013-03-10 14:07:29 +01:00
Nicolas George b0012de420 lavfi/buffersrc: implement flags.
The PUSH flags is necessary for efficient scheduling;
otherwise there is no feedback when adding frames to
closed paths.

The NO_CHECK_FORMAT is a small optimization that does
not cost much to implement.

The KEEP_REF flag maps to the add/write distinction in
the fork's API.
2013-03-10 13:56:17 +01:00
Nicolas George cb2bd91413 ffmpeg: add the -canvas_size option.
Allows, amongst other things, to override the size guessed
by the sub2video hack.

Note: the -s option could have more or less the same semantic,
but it receives a special treatment by the options system.
2013-03-10 13:48:49 +01:00
Nicolas George f9b34b8bf9 ffmpeg: port sub2video to AVFrame.
And re-enable the FATE test.
2013-03-10 13:45:15 +01:00
Nicolas GeorgeandMichael Niedermayer 4e7c61b7a7 ffmpeg: do not give away our reference to the frame.
Note: the logic here is temporary until the updates to
ffmpeg.c are merged.
2013-03-10 01:41:50 +01:00
Nicolas GeorgeandMichael Niedermayer 9cc02101ff lavc/rawdec: set field order on decoded frame. 2013-03-10 01:41:49 +01:00
Nicolas GeorgeandMichael Niedermayer 6184fa2067 rawdec: work with refcounted frames.
Adapted from commit 759001c534
by Anton Khirnov.

Also, fix the use of || instead of | in a flags check.
2013-03-10 01:41:48 +01:00
Nicolas GeorgeandMichael Niedermayer d1b456b0a8 lavu/frame: copy the channels field. 2013-03-10 01:25:02 +01:00
Nicolas George 87a954d6f4 lavf/concat: document the use of the files durations.
Address trac ticket #2319.
2013-03-06 16:58:38 +01:00
Nicolas George c31458c334 lavf/concat: compute duration if possible. 2013-03-05 16:44:51 +01:00
Nicolas George 9b211c43dc examples/muxing: fix memory leak.
Do not re-call avcodec_get_context_defaults3(), it is already
called by avformat_new_stream() and it leaks the codec
priv_data that was already allocated.

Use avformat_free_context() instead of freeing (not)
everything manually.

Fix trac ticket #2322.
2013-03-05 15:43:32 +01:00
Nicolas George 622a6f6f3b doc/muxers: specify that tee needs -map.
Address trac ticket #2311.
2013-03-05 14:20:18 +01:00
Nicolas George 3ab25e4574 Revert "lavf/concatdec: define "ffcat" and "ffconcat" extensions"
This reverts commit 6cc12353a8.

Conflicts:
	libavformat/version.h

Allowing to automatically select the concat demuxer raises
security concerns, as it allows a possibly hostile file to
access any file on the system. Guessing the format based on
the file name extension does not allow to enable the safe
mode designed to avoid it.
2013-03-05 14:10:10 +01:00
Nicolas George d9fad53f4b lavf/avio: check for : in filenames for protocols.
If the first "special" character in a filename is a comma,
it can introduce protocol options, but only if there is a
colon at the end. Otherwise, it is just a filename with a
comma.

Fix trac ticket #2303.
2013-02-28 19:30:56 +01:00
Nicolas George 3d2adeb6f8 lavfi/af_aresample: fix info log for unknown layouts. 2013-02-28 19:23:12 +01:00
Nicolas George 2bd104c72a lavfi/af_aresample: fix layout consistency check.
If the channel layout is unknown, lswr will internally use
the default one for the corresponding number of channels.
2013-02-28 19:23:12 +01:00
Nicolas George 89f9f69e3f lavf: rescale duration for chained muxers.
Fix trac ticket #2300 because the duration of the segments
was computed using the timestamp of the last packet plus its
duration using the 1/90000 default time base instead of using
the chained muxer time base.
2013-02-28 19:20:25 +01:00
Nicolas George bf63a474ca lavc/exr: use size_t instead of int for sizes.
Fix a segfault on 64-bits archs.
2013-02-28 19:13:58 +01:00
Nicolas George 13811b19d6 lavc/libopusenc: report an error if global_quality is set. 2013-02-27 19:01:34 +01:00
Nicolas George f102c24d90 ffmpeg: free last sub when using -fix_sub_duration.
Fix trac ticket #2242.

Note: under valid circumstances, when using -fix_sub_duration,
the last subtitle is a dummy termination packet, with no
allocated memory.
2013-02-27 18:57:33 +01:00
Nicolas George ea2de3d096 lavf/concatdec: add the "duration" directive. 2013-02-24 13:12:46 +01:00
Nicolas George b92c7a8f4b tools: add seek_print.
Useful for testing seek implementations.
2013-02-24 13:12:46 +01:00
Nicolas George ccc7bcc4fc lavc: check return values consistency when decoding subtitles. 2013-02-24 12:18:57 +01:00
Nicolas George e568d432b1 lavfi/formats: reindent after last commit. 2013-02-24 12:05:06 +01:00
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.
2013-02-24 11:58:52 +01:00
Nicolas George 3d7f4f8726 lavf/avio: check that the protocol supports the open mode.
Fix trac ticket #2139.
2013-02-24 11:51:16 +01:00
Nicolas George bf0712c2f8 libavfilter/af_amerge: fix segfault if init fails. 2013-02-24 11:23:51 +01:00
Nicolas George 9fa5a47197 ffmpeg: set resample_pix_fmt for sub2video.
Forgotten when the resample_* fields were added.
Fix assert failures.
2013-02-21 12:41:30 +01:00
Nicolas George 01649c79c8 lavfi/buffersrc: set channel layout if it is known.
If buffersrc was configured for frames with an unknown layout,
the incoming frames will have channel_layout = 0.
If the format negotiation has selected a known (and compatible)
channel layout for the link, the frame is assumed to have
that layout, the field must be set before injecting the frame
in the filters.
2013-02-21 12:36:35 +01:00
Nicolas George dcc73aaaa9 doc/examples: do not allocate AVFrame directly.
The size of the AVFrame structure is not part of the ABI;
it can grow with later versions. Therefore, applications
are not supposed to allocate AVFrame directly, they are
supposed to use avcodec_alloc_frame() instead.
2013-02-17 15:51:50 +01:00
Nicolas George c557a5b08e lavfi/vf_ass: reindent after last commit. 2013-02-14 16:36:03 +01:00
Nicolas George bb3303b94c lavfi/vf_ass: ignore subtitles decoding errors.
A broken packet with invalid data in the middle of the stream
should not prevent from decoding the rest of the file.

Work around trac ticket #2264.
2013-02-14 16:33:53 +01:00
Nicolas George a17ececcc7 libcelt: decode directly to the user-provided AVFrame. 2013-02-13 15:05:16 +01:00
Nicolas George b68dd8a161 lavf/concatdec: allow probing. 2013-02-13 14:58:50 +01:00
Nicolas George db9dc5154d lavf/concatdec: add signature directive. 2013-02-13 14:58:50 +01:00
Nicolas George 6d680d20ad lavf/concatdec: add safe option. 2013-02-13 14:58:50 +01:00
Nicolas George f43d09cd60 lavf: add tee pseudo-muxer. 2013-02-09 20:50:11 +01:00
Nicolas George b5884db437 lavfi: fix missing space in error message. 2013-02-07 12:22:09 +01:00
Nicolas George 3dea8b375e lavfi: remove disabled code. 2013-02-07 12:22:09 +01:00
Nicolas George 23686c72e5 doc: update filter_design.txt to API changes. 2013-02-02 19:16:11 +01:00
Nicolas George 55910e1894 lavd/alsa: simplify reordering functions definition. 2013-02-02 14:13:11 +01:00
Nicolas George d2ccab5f8a lavfi/buffersrc: forward filter_frame errors.
Note: The ret variable was unused.
2013-01-31 21:03:54 +01:00
Nicolas George dcce43340f lavfi/af_amerge: set outbuf->audio->channels.
The value is lost because of avfilter_copy_buffer_ref_props().

Fix trac ticket #2217.
2013-01-31 21:03:54 +01:00
Nicolas George ae14887ee7 lavfi/af_amerge: check for buffer queue overflows.
Without that test, ff_bufqueue_add silently discards the
oldest buffer, that leaves in[i].nb_samples inconsistent,
and causes later a segfault.
2013-01-31 21:03:54 +01:00
Nicolas George 6560625f0a lavfi/bufferqueue: add ff_bufqueue_is_full(). 2013-01-31 21:03:54 +01:00
Nicolas George 42c6f2a645 lavfi/vf_drawtext: default to expansion=normal. 2013-01-26 12:52:19 +01:00
Nicolas George 5361f4958f fate: add an attachment to the Matroska test. 2013-01-26 11:33:09 +01:00
Nicolas George 255ae9f380 lavfi: version bump and change log entries after the last commits. 2013-01-26 11:25:21 +01:00
Nicolas George 41f025dff0 ffmpeg: support filtering of unknown channel layouts. 2013-01-26 11:15:38 +01:00
Nicolas George 699b286a21 lavfi/af_anull: accept unknown channel layouts. 2013-01-26 11:15:38 +01:00
Nicolas George b00502457a lavfi/af_aresample: accept unknown channel layouts. 2013-01-26 11:15:38 +01:00
Nicolas George 6d962aec8d lavfi/af_aformat: accept unknown channel layouts. 2013-01-26 11:15:38 +01:00
Nicolas George ea645e90a1 lavfi/buffersrc: accept unknown channel layouts. 2013-01-26 11:15:38 +01:00
Nicolas George 19506af788 lavfi/sink_buffer: accept unknown channel layouts.
Add a field to the AVBufferSinkParams for a list of accepted
channel counts.
Change the default value for the lists in AVBufferSinkParams
to NULL, to let lavfi fill them with something useful.
The fail_enomem path is unneeded because filters are uninited
on failure.
2013-01-26 11:15:38 +01:00
Nicolas George b6b2f3433c lavfi: implement ff_query_formats_all(). 2013-01-26 11:15:38 +01:00
Nicolas George 7bb98b753b lavfi: implement ff_all_channel_counts(). 2013-01-26 11:15:38 +01:00
Nicolas George b6afb2dde1 lavfi: support unknown channel layouts. 2013-01-26 11:15:38 +01:00
Nicolas George fccd8c21c4 ffmpeg: add -guess_layout_max option. 2013-01-26 11:15:38 +01:00
Nicolas George beb5d8f07d ffmpeg: accept "chapters" as forced key frames.
Allow to force a key frame at the beginning of each chapter.
2013-01-19 15:22:34 +01:00
Nicolas George 0942aa4637 lafv/matroska: add A_OPUS/EXPERIMENTAL codec name.
The exact packing of Opus inside Matroska is not finalized.
Use A_OPUS/EXPERIMENTAL as codec name, like mkvtoolnix.
The A_OPUS name stays to let ffmpeg open files it has produced
until now, but newly produced file use the EXPERIMENTAL version.
Once the spec is stabilized it will be possible to consider
options to ensure compatibility with these files.
2013-01-16 15:53:01 +01:00
Nicolas George 0e79fe37e5 lavd/v4l2: init return value.
Fix a warning and random failures.
2013-01-16 12:21:58 +01:00
Nicolas George 7e5c5fa5fc lavfi/vf_overlay: check that filter_frame does not return EAGAIN.
EAGAIN is used internally in the code; it currently does not make
sense as a return code from the next filter.

Should fix CID966655.
2013-01-10 21:55:02 +01:00
Nicolas George ff6b34009d lavfi: fix use-after-free in ff_filter_frame.
Unlike the original ff_start_frame code, the incoming reference
may be freed before that point.

Fix CID966654.
2013-01-08 13:31:33 +01:00
Nicolas George 305180f525 lavu/base64: return meaningful error code. 2013-01-05 15:40:40 +01:00