Mostly based on doc/examples/filtering.c. lavfi API is still limited to
"buffer feeding" instead of "frame feeding" at the moment, so this
example code sticks with it.
The AVOptions based default to threads auto in 2473a45c8
works only if avplay does not use custom option handling
for -threads.
CC: <libav-stable@libav.org>
Samples buffer ref is allocated and loaded with the uninitialized data
pointers:
av_asrc_buffer_add_buffer()
-> av_asrc_buffer_add_samples()
-> avfilter_get_audio_buffer_ref_from_arrays(data, ...)
...which leads to a crash with at least lavfi/ashowinfo in case of !NULL
(see the for loop while samplesref->data[plane]).
For video, mark the first sample in a trun which doesn't have the
sample-is-non-sync-sample flag set as a keyframe.
In particular, the "sample does not depend on other samples" flag
isn't enough to make it a keyframe, since later frames still can
reference frames prior to that one (the flag only says that that
particular frame doesn't depend on other frames).
This fixes bug 215.
Signed-off-by: Martin Storsjö <martin@martin.st>
* qatar/master: (36 commits)
adpcmenc: Use correct frame_size for Yamaha ADPCM.
avcodec: add ff_samples_to_time_base() convenience function to internal.h
adx parser: set duration
mlp parser: set duration instead of frame_size
gsm parser: set duration
mpegaudio parser: set duration instead of frame_size
(e)ac3 parser: set duration instead of frame_size
flac parser: set duration instead of frame_size
avcodec: add duration field to AVCodecParserContext
avutil: add av_rescale_q_rnd() to allow different rounding
pnmdec: remove useless .pix_fmts
libmp3lame: support float and s32 sample formats
libmp3lame: renaming, rearrangement, alignment, and comments
libmp3lame: use the LAME default bit rate
libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing
libmp3lame: cosmetics: remove some pointless comments
libmp3lame: convert some debugging code to av_dlog()
libmp3lame: remove outdated comment.
libmp3lame: do not set coded_frame->key_frame.
libmp3lame: improve error handling in MP3lame_encode_init()
...
Conflicts:
doc/APIchanges
libavcodec/libmp3lame.c
libavcodec/pcxenc.c
libavcodec/pnmdec.c
libavcodec/pnmenc.c
libavcodec/sgienc.c
libavcodec/utils.c
libavformat/hls.c
libavutil/avutil.h
libswscale/x86/swscale_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This prevents having to sign-extend on 64-bit systems with 32-bit ints,
such as x86-64. Also fixes crashes on systems where we don't do it and
arguments are not in registers, such as Win64 for all weight functions.
The parser was fixed so this workaround should no longer
be necessary.
This allows using stream-copy to fix files with keyframes
incorrectly marked.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
We now require at least libmp3lame 3.98.3.
lame_encode_buffer_interleaved() still doesn't work for mono, but it does not
"die"; it just expects a stereo interleaved buffer.
This avoids reading any old data in the AVIOContext buffer after
the seek, and indicates to the mpegts demuxer that we've seeked,
avoiding continuity check errors.
Signed-off-by: Martin Storsjö <martin@martin.st>