The variable is copied to subsequent threads at the same time, so this
may cause wrong ref_count[] values to be copied to subsequent threads.
This bug was found using TSAN.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Discontinuous transmission is an addition to VAD/VBR operation, that
allows to greatly reduce bitrate for silent chunks or stationary
noises.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The value used in allocation is based on a estimate of the
maximum size of the spectral coefficients multiplied with 2
and rounded up. The exact or a tighter limit should be
found and used instead. But this issue shouldnt be left
open until someone works on that.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ff_get_cpu_flags_x86() requires cpuid(), which is conditionally defined
elsewhere in the file. Surrounding the function body with ifdefs allows
building even when cpuid is not defined. An empty cpuflags mask is
returned in this case.
Now that there is CPU detection in YASM, there will always be one of
inline or external assembly enabled, which obviates the need to fall
back on CPU detection through compiler intrinsics.
* commit 'ab35ec29a4071871934856c00da7d6ebcc0c095b':
vf_overlay: get rid of pointless messing with timebase.
samplefmt: make av_samples_alloc() initialize the data to silence.
libspeexdec: handle NULL return value from speex_packet_to_header()
h264probe: Don't error out on bits that no longer are reserved
mpegvideo: set extended_data in ff_update_duplicate_context()
libspeexdec: properly handle DTX for multiple frames-per-packet
libspeexdec: move the SpeexHeader from LibSpeexContext to where it is used
libspeexdec: simplify setting of frame_size
libspeexdec: set channel_layout
Conflicts:
libavfilter/vf_overlay.c
libavformat/h264dec.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This makes sure any buffered data is written to the segment, for
muxers that buffer up data internally (e.g. fragmented mp4).
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes sure new inline headers are emitted when the next
packet is written. This allows segmenting mpegts without calling
write_header/write_trailer (nor freeing/reiniting the muxer)
for each segment.
Signed-off-by: Martin Storsjö <martin@martin.st>
Some segmented formats (such as fragmented mp4) are "bare", as in,
the segment files do not have the same headers/trailers as full normal
files of that format have.
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes sure the muxers are set up in the way they expect
with no data left around from the previous run (which could
cause various issues including memory leaks, depending on the chaine
muxer).
This fixes memory leaks with the mpegts and flv muxers. It also
makes the usage of chained muxers correct.
Signed-off-by: Martin Storsjö <martin@martin.st>
With this change, the segmenter muxer doesn't rely on anything
not available/supported to libavformat external users, making
the segmenter muxer do things just like a normal segmenter
application using libavformat would do.
Signed-off-by: Martin Storsjö <martin@martin.st>
Before, the chained muxer reused the AVStreams array from
the outer muxer, which made it impossible to use the proper
public functions (such as av_write_frame) when calling the
chained muxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit '29abb04e73b0580ebe38703cadb988d26df6a76a':
libspeexdec: If the channel count is not valid, decode as stereo.
libspeexdec: improve setting of Speex mode and sample rate
libspeex: Add a private option for enabling VAD
xtea: Test inplace decryption
xtea: Fix CBC decryption when src==dst
xtea: Factorize testing into a separate function
configure: Refactor HAVE_ options available on the command line
avconv/avprobe: Add missing 'void' to exit_program() definition
Allow use of strncpy()
blowfish: Add more tests
blowfish: Fix CBC decryption with dst==src
blowfish: Factorize testing into a separate function
Conflicts:
configure
libavcodec/libspeexdec.c
libavutil/xtea.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The timebases before where only guranteed to be 1/fps precisse
and could cause AV sync errors on low fps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
AVFrame.extended_data has to reset to the AVFrame.data of the current
thread context after copying the frame contents.
Fixes crashes with frame-threading after 2bc0de3858.
otherwise a unexpected timebase could be choosen
that is one that is thousand times more precisse than requested
which can have sideeffects.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Speex detects non-speech periods and encodes them with just enough bits
to reproduce the background noise, aka ``comfort noise generation''.
Signed-off-by: Martin Storsjö <martin@martin.st>