Resetting it on codec init would incorrectly clear the values
if av_find_stream_info was already run before, in particular
breaking ffplay.
This fixes trac tickets #213 and #262.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Specifically crafted samples can reinit ogg->streams[] while
reading samples, and thus we should not cache old pointers since
these may no longer be valid.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
According to MPEG-TS specs, the continuity_counter shall not be
incremented when the adaptation_field_control of the packet
equals '00' or '10'.
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Declaring tools associated with each library in their respective
makefiles allows these tools to easily depend on the correct
prerequisites and link against the libs they need.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Set DV packet durations using fields_per_frame.
This requires turning gxf_stream_info into the demuxer's context for access to the value in gxf_packet().
Since MPEG-2 seems to work fine this done only for DV.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Parse the extension flag bit when reading the MPEG4 AudioSpecificConfig.
This has nothing to do with SBR/PS contradictory to what was noted when it was removed.
Code would allocate a new context but forget to assign it
to the pointer actually passed to avformat_open_input,
potentially causing a crash.
Even if it was initialized it would cause a memleak.
This caused crashes with e.g. mpd, see also
http://bugs.gentoo.org/show_bug.cgi?id=373423
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This is needed because not all players (e.g. MPlayer) are able to distinguish
two different Bink audio decoders when codec_tag is set.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Before this, almost all module groups have been used for grouping functions
and fields in structures semantically. This causes them to not appear
properly in the file documentation and needlessly clutters up the "Modules"
index.
Additionally, this commit streamlines some spelling and appearances.
The PTS for captured audio was measured using snd_pcm_htimestamp.
snd_pcm_htimestamp hangs when the input is a dsnoop plugin.
Furthermore, at some point, snd_pcm_htimestamp started returning monotonic
timestamps rather than wall clock timestamps, in most but not all
situations.
Monotonic timestamps are fine, but ffmpeg uses wall clock timestamps
everywhere else, and we have no API to inform the user which kind of
timestamps it is.
A separate snd_pcm_htimestamp is only slightly less accurate than
snd_pcm_htimestamp: the standard deviation for the difference between two
consecutive timestamps is (on my hardware):
- ~13 µs with snd_pcm_htimestamp;
- ~35 µs with av_gettime;
- ~5 µs with av_gettime and a timefilter.
av_open_input_stream used to allow this, even though it makes no sense.
Make it just print a warning instead of failing, thus restoring
compatibility.
Note that avformat_open_input() will still reject this combination.
Signed-off-by: Anton Khirnov <anton@khirnov.net>