This avoids exposing a dummy AVStream which won't get any data
and which will make avformat_find_stream_info wait for info about
this stream.
Signed-off-by: Martin Storsjö <martin@martin.st>
Searching for packet markers doesn't make sense for this use case,
where packets are fed one at a time to the demuxer.
This fixes playing back streams that have packets not starting
with the 0x82, 0x00, 0x00 marker.
Signed-off-by: Martin Storsjö <martin@martin.st>
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
Since the mandatory memcpy in vsrc_buffer has been eliminated, there
shouldn't be any significant reason to build without lavfi anymore.
This will make upcoming support for complex filtergraphs easier to do.
It can take a long time before subtitles or data streams show up,
so we shouldn't wait for those before assuming we have all info
for streams.
Signed-off-by: Martin Storsjö <martin@martin.st>
If get_filtered_video_frame failed above, tb might not be
initialized at all, so don't scale using it.
This fixes cases where avplay could crash if aborting
avformat_find_stream_info with ctrl+c.
Signed-off-by: Martin Storsjö <martin@martin.st>
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.
Signed-off-by: Martin Storsjö <martin@martin.st>
This fixes the warning:
libavcodec/aacenc.c:524: warning: passing argument 2 of ‘deinterleave_input_samples’ discards qualifiers from pointer target type
pthread_cond_wait is supposed to return an integer,
and indeed does sometimes. Fix its function declaration
to match its behavior and POSIX.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
The audio codecs property is composed by all values except
SUPPORT_SND_INTEL (0x0008) and SUPPORT_SND_UNUSED (0x0010) which are
unused.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Current code, with a filterchain such as
(input - yuv411) -> (scale - any) -> (sink - any)
will result in yuv420 being chosen for the second link, which is clearly
not right.
This commit attempts to improve in the following way:
repeat until convergence:
loop over all filters
find input link with exactly one format
force this format on all output links of the same type (if possible)
Fixes a floating-point exception further down.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
The square is always passed as 1 whenever the function is called and
thus the if block never gets executed.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
The previous condition of 0 page size was wrong,
that would disable the mechanism for all frames at
a start of a page, thus some keyframes still would not
get their own granule.
The real problem is that header packets must not be flushed,
but they have (and must have) 0 granule and thus would
be detected as keyframes.
Add a separate parameter to mark header packets.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
When set, if an Ogg stream buffer has enough data, a page is made
instead of filling maximum-size pages. Using smaller pages results
smaller seek intervals at the expense of higher container overhead.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>