Most of these variables are only used in av_dlog statements, some
are required but not used by other macros.
Signed-off-by: Mans Rullgard <mans@mansr.com>
asf_read_seek() inside the asf demuxer already does the
right thing, it tries the index and if that fails it uses
binary search. If binary search is called from outside of asfdec.c
it will fail because the asf code cannot clean up after itself.
Therefore introduce AVFMT_NOBINSEARCH that prevents the seek
code to fallback to binary search and AVFMT_NOGENSEARCH that
prevents the seek code to fallback to generic search.
In the main loop, stream_number is incremented after checking the stream type,
so the search usually will not find the wanted stream.
This patch eliminates the useless stream_number variable and introduces a new
one, called real_stream_index to store the real stream index of the current
stream, no matter if we are looping through all the streams or only the streams
of a program.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Yet another fix for the code originally designed for use without related_stream.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This should fix behavior introduced by commit
96573c0d76. Av_rescale_rnd() is not
lossless so if two timestamps are equal after being rescaled they are
not always actually identical. This patch use av_compare_ts() to get
always a correct result.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
As per issue2629, most 23.976fps matroska H.264 files are incorrectly
detected as 24fps, as the matroska timestamps usually have only
millisecond precision.
Fix that by doubling the amount of timestamps inspected for frame rate
for streams that have coarse time base. This also fixes 29.970 detection
in matroska.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 78431098f9)
Tested with mplayer based on this report
http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
AVERROR_NUMEXPECTED is used only in the image muxer and demuxer, and
has a too much specific meaning, which is better explained through a
log message. Thus it can be replaced by AVERROR(EINVAL).
This breaks API.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
After switching this from a statically allocated array to a
dynamically allocated one in the major bump, this needs explicit
freeing.
Signed-off-by: Martin Storsjö <martin@martin.st>
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.
This breaks API.
In particular, now it assumes that
a) chapters are chronologically ordered
b) chapters have the same timebases
c) duration of the stream is known
and asserts if any of these is not met.
Make it properly deal with harsher conditions.
fixes issue2320
Turns a comment into an av_dlog() instruction, also add a commented
issues.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 77f21ce464)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>