Commit Graph
100 Commits
Author SHA1 Message Date
Nicolas George 50a4d076ce lavfi/trim: mark link closed on EOF.
Fix trac ticket #2620.
2013-06-02 23:19:42 +02:00
Nicolas George fc82f4a1f8 ffmpeg: ignore EOF when pushing frames to filters.
EOF is not a fatal condition, it is normally produced
by a few filters.

TODO: take it into account to avoid useless decoding.
2013-06-02 23:19:42 +02:00
Nicolas George ca2f6b6932 lavf/concat: reject empty scripts.
Fix trac ticket #2566.
2013-05-15 16:53:35 +02:00
Nicolas George 4582e4c086 lavfi: add comments to explain the negotiation loop. 2013-05-07 18:40:51 +02:00
Nicolas George 78d16b6a51 lavfi: fix filter format negotiation loop.
query_formats() returning EAGAIN is not considered a progress
in the format negotiation.

If the filter returns EAGAIN but did set some of its formats
lists, it could be considered a partial success and counted
as progress in the negotiation. Not counting it is not a
problem because it currently only happens in the first round,
where there will always be some progress on the other filters.
2013-05-07 18:40:51 +02:00
Nicolas George 449704b475 ffmpeg: move a local variable definition later.
Fix a segfault when using the -map option without input files.
2013-05-07 18:39:45 +02:00
Nicolas George fa245e432b lavf/matroskaenc: return an error for unsupported types. 2013-05-04 14:12:57 +02:00
Nicolas George d608a27d9e lavf/concatdec: remove invalid check for AVSEEK_FLAG_BACKWARD. 2013-05-04 14:11:53 +02:00
Nicolas George 3fc66dfef2 lavf: filter out AVSEEK_FLAG_BACKWARD in new API.
Also document that it has no effect.
2013-05-04 14:11:53 +02:00
Nicolas George cc24afb45c lavf: call the new seek API from the old.
If the demuxer implements read_seek2() and not read_seek(),
call avformat_seek_file() from av_seek_frame().
Allow to properly seek in formats that only implement the
new API from applications that use the old one.
Tested with mplayer and a concat script.
2013-05-04 14:11:53 +02:00
Nicolas George ceb33f3aee lavc: copy subtitle_header when copying context.
Fix trac ticket #2489.
2013-05-01 11:56:34 +02:00
Nicolas George 276fcbde6c lavf: data muxer and demuxer.
Allow to use tools designed to work with demuxers, muxers
and packets (for example ffmpeg itself) to process raw byte
streams (like aviocat).
2013-05-01 11:56:34 +02:00
Nicolas George 70feca926b lavc: check decoded subtitles encoding.
Address trac ticket #2431.
2013-04-24 19:41:27 +02:00
Nicolas George 29ebb7ba8d lavu: fix GET_UTF8 macro.
Prevent 0xFE and 0xFF from being considered the start of
non-standard 7-bytes sequences. No noticeable effect on speed.
2013-04-24 19:41:27 +02:00
Nicolas George fd7a7e11b9 lavfi/buffersink: fix possible leaks after allocation failures.
Should fix Coverity CID 1005313, 1005314, 1005315.
2013-04-21 16:11:36 +02:00
Nicolas George b57c23f8c8 lavfi: add asetrate filter. 2013-04-21 15:20:50 +02:00
Nicolas George b1cc12d0e3 ffmpeg: make -aspect work with -vcodec copy. 2013-04-18 22:59:54 +02:00
Nicolas George b42827ffd9 lavfi/vf_aspect: improve compatibility of parsing.
Try to accept both the old "num:den" and the new "num/den"
syntax. Fix "aspect=2" being ignored due to a missing den.

Also remove a duplicated #include.
2013-04-18 20:51:55 +02:00
Nicolas George 300ca0763b examples/filtering_audio: fix frame leak.
The frame is not used after being added to the filter
graph, there is no need to keep the reference.
2013-04-18 17:03:01 +02:00
Nicolas George e3e6aa7afb lavfi/buffersrc: fix failed requests count.
The line was lost during the AVFrame transition.
It causes programs relying on the failed requests count,
especially ffmpeg, to add frames to the wrong input.

Fix trac ticket #2467.
2013-04-17 11:32:03 +02:00
Nicolas George 9e8e03de38 lavu/opt: check int lists length for overflow.
Also add parens on macro arguments.
2013-04-13 20:19:24 +02:00
Nicolas George 2a1d7ea5f8 lavu: add parens to macro argument. 2013-04-13 20:19:24 +02:00
Nicolas George 76c8060654 lavu: add av_pure to av_int_list_length_for_size. 2013-04-13 20:19:24 +02:00
Nicolas George 6fbb21d685 lavfi/buffersink: factor checks for lists sizes. 2013-04-13 20:19:24 +02:00
Nicolas GeorgeandMichael Niedermayer 62d888ef0e ffmpeg: use options for abuffersink.
Also remove unused buffersink_params.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 12:11:10 +02:00
Nicolas GeorgeandMichael Niedermayer e48ded8551 lavfi/buffersink: accept parameters as options.
Move validation from init to query_formats().
Accept the formats lists as binary options.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 12:12:51 +02:00
Nicolas GeorgeandMichael Niedermayer af0d270aac lavu: add helper functions for integer lists.
Add av_int_list_length() to compute a list length.
Add av_opt_set_int_list() to set a binary option.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 12:09:51 +02:00
Nicolas George 08dd2c9df1 fate: add tests for unknown channel layouts. 2013-04-11 13:09:33 +02:00
Nicolas George 0d58bbb28d lavfi/buffersrc: update for compatibility with the fork.
Merge and adapt commit d28cb84 by Anton Khirnov.
2013-04-11 13:09:10 +02:00
Nicolas George de38e7c8c3 ffmpeg: use a rational for -aspect option. 2013-04-09 20:16:20 +02:00
Nicolas George 0884d04dc3 lavc: fix recoded subtitles end.
Text subtitles packets are not 0-terminated (and if they are,
it is handled by the recoding process since 0 is a valid
Unicode code point). The terminating 0 would overwrite the
last payload octet.

OTOH, packets must be 0-padded.

Fix a problem reported in trac ticket #2431.
2013-04-07 13:25:24 +02:00
Nicolas George 83affcde51 lavc: use packet duration for subtitles if necessary.
Fix trac ticket #2397.
2013-04-04 14:04:51 +02:00
Nicolas George 464f94b206 lavc: do not init frame with guessed layout.
It is breaking support from files with unknown layout.
2013-04-03 17:44:10 +02:00
Nicolas George d38c173dfb lavfi/af_atempo: simplify request_frame loop. 2013-04-03 17:44:10 +02:00
Nicolas George b570f24d76 lavfi/af_asetnsamples: simplify request_frame loop. 2013-04-03 17:44:10 +02:00
Nicolas George 9566ba91ab lavfi/f_ebur128: remove request_frame hack. 2013-04-03 17:44:10 +02:00
Nicolas George 77fa554b6e lavfi/vf_tile: simplify request_frame loop. 2013-04-03 17:44:10 +02:00
Nicolas George 69d67fb622 lavfi: reindent after last commit. 2013-04-03 17:44:10 +02:00
Nicolas George 79d8cfacf0 lavfi: loop on request_frame if necessary.
Some filters need several input frames before producing output.
For these filter, it becomes simpler to return 0 in
request_frame() and let the framework call it again until
output has been produced.
2013-04-03 17:33:27 +02:00
Nicolas George 52853077ee lavfi/af_asetnsamples: fix EOF handling.
Only filter one buffered frame.
Correctly return EOF if there is none.
2013-04-01 10:38:52 +02:00
Nicolas George 983d04dd40 lavu/opt: make sure av_opt_set_bin() handles NULL/0. 2013-04-01 10:38:38 +02:00
Nicolas George 9dd54d7422 lavd/v4l2: fully init an ioctl argument.
Silence a valgrind warning about uninitialized memory.
2013-04-01 10:38:14 +02:00
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.
2013-04-01 10:37:48 +02:00
Nicolas George 4f112a8e34 lavf/mux: add the flush_packets option.
Note: a lot of muxers already do the flushing explicitly.
2013-03-24 23:19:07 +01:00
Nicolas George 125acd2152 lavfi: support multiple rounds of format negotiation.
Remove the temporary hack for amerge and replace it with a
generic solution.
2013-03-24 23:17:47 +01:00
Nicolas George 00da527b44 lavfi/af_amerge: return EAGAIN if the input layouts are not known.
Also downgrade the error to a warning.
2013-03-24 23:17:47 +01:00
Nicolas George 57cb4fb075 lavfi: add test for concat. 2013-03-24 23:16:40 +01:00
Nicolas George 2753d4ebf0 lavfi/vf_yadif: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 8d4d11cd89 lavfi/vf_unsharp: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 769cc30072 lavfi/vf_transpose: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 392ec7ec1c lavfi/vf_pad: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George b201c167d0 lavfi/vf_fps: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 4e2bcec95f lavfi/vf_fade: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 80580b405a lavi/vf_drawbox: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 37438d0a72 lavfi/vf_delogo: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 40ecd44f00 lavfi/vf_decimate: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George 6202cf5dd8 lavfi/vf_crop: use standard options parsing. 2013-03-20 21:13:56 +01:00
Nicolas George e9ca55aedd lavfi/af_volume: use standard options parsing. 2013-03-20 21:13:56 +01:00
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