On allocation, the array length is multiplied by sizeof(int64_t),
this prevents the multiplication from overflowing.
Signed-off-by: Martin Storsjö <martin@martin.st>
If there is only 1 stream in an flv avformat_find_stream_info will continually
read until probesize is reached. This should stop it reading if the metadata
also claims there to be 1 stream.
Stop the avio input at a point where amf_parse_object can
continue parsing the end of the object seamlessly, when all
data is available.
If unsupported data is encountered within the keyframes object,
try seeking to the start of the keyframes object - if the seek
back was successful, the caller can continue parsing the rest
of the AMF data.
Signed-off-by: Martin Storsjö <martin@martin.st>
Current keyframes data parser unconditionally rewind metadata to
the end at the end of function. As result ALL metadata located
after keyframes index not parsed, and as metadata object can have
ANY placement inside metadata it can lead to unpredictable result
(bitrate can not be found, etc.). As result FLV movie will not
play at all in such situation.
Signed-off-by: Martin Storsjö <martin@martin.st>
Current keyframes data parser unconditionally rewind metadata to the end
at the end of function. As result ALL metadata located after keyframes
index not parsed,
and as metadata object can have ANY placement inside metadata it can
lead to unpredictable result
(bitrate can not be found, etc.). As result FLV movie will not play at
all in such situation.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
'keyframes' metatag is not part of the standard, it is just
convention to use such kind of metatag information for indexing.
Structure is following, it allows to have it inconsistent:
keyframes:
times (array):
time0 (num)
time1 (num)
time2 (num)
filepositions (array)
position0 (num)
position1 (num)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read
get_partial_buffer will be made private later
get_strz is left out becase I want to change it later to return
something useful.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b7effd4e83)
In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read
get_partial_buffer will be made private later
get_strz is left out becase I want to change it later to return
something useful.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
(cherry picked from commit c6610a216e)
in its place.
av_metadata_set() is going to be dropped at the next major bump.
Originally committed as revision 22961 to svn://svn.ffmpeg.org/ffmpeg/trunk
Implement flv_read_seek(), add a missing check on stream_index
and fix timestamp rounding in rtmp_read_seek().
Also add the flv_read_seek2() function, which is not enabled but is
useful as reference.
To actually implement flv_read_seek2() correctly, there would need to
be some corresponding av_url_read_fseek2() function to propagate the
timestamps down to the ByteIOContext and URLContext.
Patch by Howard Chu <hyc <at> highlandsun.com>.
See the thread:
Subject: [FFmpeg-devel] RTMP seek support
Date: 2010-03-28 23:35:02 GMT
Originally committed as revision 22904 to svn://svn.ffmpeg.org/ffmpeg/trunk