Be more careful when an input stream encounters EOF when its filtergraph
has not been configured yet. The current code would immediately mark the
corresponding output streams as finished, while there may still be
buffered frames waiting for frames to appear on other filtergraph
inputs.
This should fix the random FATE failures for complex filtergraph tests
after a3a0230a98
This makes sure the actual stream parameters are used, which is
important mainly for hardware decoding+filtering cases, which would
previously require various weird workarounds to handle the fact that a
fake software graph has to be constructed, but never used.
This should also improve behaviour in rare cases where
avformat_find_stream_info() does not provide accurate information.
Currently, a filtergraph will pull in the output constraints from its
corresponding decoder context, which breaks proper layering. Instead,
explicitly send the constaints on the output parameters to the
filtergraph.
This is similar to what is done for filtergraph inputs in
30ab4c51a180610d9f1720c75518d763515c0d9f
Currently, calling configure_filtergraph() will pull in the input
parameters from the corresponding decoder context. This has the
following disadvantages:
- the decoded frame is a more proper source for this information
- a filter accessing decoder data breaks proper layering
Add functions for explicitly sending the input stream parameters to a
filtergraph input - currently from a frame and a decoder. The decoder
one will be dropped in future commits after some more restructuring.
We already have all the necessary information in open_output_file().
This makes the information about the stream/filtergraph mappings
available earlier.
It is now only used by the av_parser_change() call during streamcopy, so
allocate a special AVCodecContext instance for this case. This instance
should go away when the new parser API is finished.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
This is necessary to preserve the quality information currently exported
with coded_frame. Add the new side data to every encoder that needs it,
and use it in avconv.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
The current code is less than straightforward due to the fact that
output streams can be created based on filtergraph definitions. This
change should make the code simpler and more readable. It will also be
useful in the future commits.
The option is enabled by default, but can be disabled.
If this is enabled, such side data isn't copied into the output stream
(except when doing stream copy).
Signed-off-by: Martin Storsjö <martin@martin.st>
Store a variable per OutputStream instead of globals for
audio/video/extradata. This makes the code simpler and cleaner and fixes
2pass with multiple output streams.
It has not worked for anything other than fringe codecs (asv1/2, mdec,
mjpeg[b]) since about 2003 and nobody ever noticed or complained. This
sufficiently proves that there are no users of this option who have a
clue of what they are doing, so it is completely useless.