| Branch: | Revision:

ffmpeg / libavformat / flvdec.c @ 578d6861

History | View | Annotate | Download (20.4 KB)

# Date Author Comment
578d6861 04/12/2011 08:08 PM Martin Storsjö

flvdec: Allow parsing keyframes metadata without seeking in most cases

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,...

ff1ec0c3 04/12/2011 05:17 PM Anton Khirnov

avio: undeprecate av_url_read_fseek/fpause under nicer names

It seems their replacements won't be ready anytime soon.

b5304f7b 04/12/2011 09:38 AM Kharkov Alexander

flvdec: Fix support for flvtool2 "keyframes based" generated index

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...

e3c007bb 04/04/2011 12:29 AM Justin Ruggles

flvdec: fix segfault in amf_parse_object() due to NULL key

fixes Issue 2674

8978feda 04/03/2011 08:46 PM Anton Khirnov

avio: introduce an AVIOContext.seekable field

Use it instead of url_is_streamed and AVIOContext.is_streamed.

cb7e2c1c 03/31/2011 05:31 AM Kharkov Alexander

flvdec: read index stored in the 'keyframes' tag.

'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:
times (array):...

933e90a6 03/21/2011 06:54 PM Anton Khirnov

avio: make av_url_read_fseek/fpause internal.

Signed-off-by: Ronald S. Bultje <>

2912e87a 03/19/2011 01:33 PM Mans Rullgard

Replace FFmpeg with Libav in licence headers

Signed-off-by: Mans Rullgard <>

45a8a02a 03/17/2011 02:24 AM Anton Khirnov

lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense

Signed-off-by: Ronald S. Bultje <>

66e5b1df 03/07/2011 10:20 PM Anton Khirnov

avio: deprecate url_feof

AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <>

76aa876e 03/07/2011 04:03 PM Anton Khirnov

avio: avio_ prefix for url_fsize

Signed-off-by: Ronald S. Bultje <>

a2704c97 03/04/2011 04:26 PM Anton Khirnov

avio: add avio_tell macro as a replacement for url_ftell

Signed-off-by: Ronald S. Bultje <>

e356fc57 03/01/2011 05:22 PM Anton Khirnov

lavf: replace all uses of url_fskip with avio_seek

Signed-off-by: Ronald S. Bultje <>

6b4aa5da 03/01/2011 05:12 PM Anton Khirnov

avio: avio_ prefix for url_fseek

Signed-off-by: Ronald S. Bultje <>

b7effd4e 02/21/2011 04:23 PM Anton Khirnov

avio: avio_ prefixes for get_* functions

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...

ae628ec1 02/20/2011 01:37 PM Anton Khirnov

avio: rename ByteIOContext to AVIOContext.

Signed-off-by: Ronald S. Bultje <>

dfd2a005 01/29/2011 10:55 PM Luca Barbato

Replace dprintf with av_dlog

dprintf clashes with POSIX.1-2008

c6610a21 01/26/2011 10:10 PM Diego Elio Pettenò

Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.

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.

caa7ad5d 11/03/2010 08:12 PM Thierry Foucu

Fix 16kHz Mono NellyMoser in flv.

Patch by Thierry Foucu, tfoucu gmail

Originally committed as revision 25667 to svn://

7d6096e4 07/01/2010 10:31 PM Baptiste Coudurier

Use ext sample from mpeg4audio config if set with AAC SBR

Originally committed as revision 23947 to svn://

2ef6c124 04/25/2010 02:27 PM Stefano Sabatini

Mark av_metadata_set() as deprecated, and use av_metadata_set2()
in its place.

av_metadata_set() is going to be dropped at the next major bump.

Originally committed as revision 22961 to svn://

fc8fa007 04/18/2010 07:09 PM Howard Chu

Implement librtmp seek support.

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...

7e939205 04/11/2010 12:21 PM Howard Chu

Set audio bit rate.

Patch by Howard Chu, hyc highlandsun com

Originally committed as revision 22835 to svn://

527c2e64 04/01/2010 08:02 AM Howard Chu

Fix flvdec start-of-frame.
Patch by Howard Chu hyc highlandsun com

Originally committed as revision 22757 to svn://

cc947f04 03/31/2010 12:29 PM Jean-Daniel Dupas

Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.

Patch by Jean-Daniel Dupas, devlists shadowlab org

Originally committed as revision 22744 to svn://

72415b2a 03/30/2010 11:30 PM Stefano Sabatini

Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://

fdf46622 01/19/2010 07:41 PM Baptiste Coudurier

fetch flv duration from file if it is set to 0 in metadata

Originally committed as revision 21329 to svn://

cc38e063 12/14/2009 03:59 PM Michael Niedermayer

Revert flvdec.c part of r20836
Use AV_METADATA_DONT_STRDUP* / use av_malloced metadata instead of strduped
arrays of fixed length.
Code from ffmbc with changes to adapt to our metadata API.
Reason: memleak & fix is not trivial

Originally committed as revision 20866 to svn://

8e9efe43 12/14/2009 03:30 AM Daniel Verkamp

FLV 8-bit PCM is unsigned, not signed

Fixes issue #1569

Originally committed as revision 20853 to svn://

12ad6671 12/13/2009 08:27 PM Michael Niedermayer

Use AV_METADATA_DONT_STRDUP* / use av_malloced metadata instead of strduped
arrays of fixed length.
Code from ffmbc with changes to adapt to our metadata API.

Originally committed as revision 20836 to svn://

0aa6a518 11/20/2009 07:16 PM Daniel Verkamp

Add codec id for Flash screen codec v2 and hook it up in FLV demuxer

Originally committed as revision 20563 to svn://

5aea268d 11/11/2009 08:24 PM Alex Converse

Add a channels field to MPEG4AudioConfig.

Originally committed as revision 20512 to svn://

37e34df5 09/15/2009 02:56 PM Michael Niedermayer

Check offset in flv_probe()

Originally committed as revision 19858 to svn://

b126dee9 09/07/2009 10:49 AM Martin Storsjö

Use all 32 bits of the timestamp when calculating flv duration.
At the moment, duration is mainly set from the metadata packet. If that is not
available, the fallback is checking the low 24 bits of the last packet. This is
not enough for files over 4,6 hours in length, so read all 32 bits instead....

d2a47a57 09/04/2009 09:43 PM Justin Ruggles

Remove fake Speex header creation from FLV demuxer. Having it there was not the
correct solution to the problem. A better solution might be possible later once
Speex is supported in muxers.

Originally committed as revision 19761 to svn://

63613fe6 07/26/2009 12:20 PM Måns Rullgård


Originally committed as revision 19508 to svn://

df2bd71a 07/06/2009 09:54 PM Aurelien Jacobs

flvdec: expose metadata through the generic metadata API
original patch from Art Clarke aclarke at xuggle dot com

Originally committed as revision 19364 to svn://

09e54e1f 07/06/2009 09:49 PM Aurelien Jacobs

flvdec: re-enable metadata parsing
duration and videodatarate values are actually useful
original patch from Art Clarke aclarke at xuggle dot com

Originally committed as revision 19363 to svn://

8caa0f06 07/06/2009 09:46 PM Aurelien Jacobs

flvdec: don't set format and codec context from metadata values
This has proven to be useless and even harmfull since r18460 (expect
for duration and videodatarate).
original patch from Art Clarke aclarke at xuggle dot com

Originally committed as revision 19362 to svn://

c1c206b3 06/24/2009 10:10 PM Justin Ruggles

flvdec: Build a Speex header during FLV demuxing using required and
default values. This is needed because FLV files with Speex do not
contain a Speex header, which is necessary for stream copy.

Originally committed as revision 19267 to svn://

e1d8d7bb 06/16/2009 11:14 PM Art Clarke

Downgrade message log level (from AV_LOG_ERROR to AV_LOG_DEBUG) about
skipped metadata packet in FLV demuxer.

Patch by Art Clarke a${surname} At xuggle - com.

Originally committed as revision 19210 to svn://

4eec2606 04/17/2009 05:42 PM Michael Niedermayer

Remove unused variable from flv_read_metabody() found by CSA.

Originally committed as revision 18571 to svn://

77daaf67 04/12/2009 04:01 AM Michael Niedermayer

Disable metadata reading. Yes, I would like to know what this code is good for
and this is the easiest way to. It would be a lot of messy code we can drop
if it is useless.
As a sideeffect this fixes issue977.

Originally committed as revision 18460 to svn://

634b927f 04/03/2009 03:32 PM Michael Niedermayer

Do not fail on zero packets.

Originally committed as revision 18328 to svn://

fcb4228c 04/02/2009 03:52 AM Baptiste Coudurier

skip empty data packets in flv, fix input.flv

Originally committed as revision 18306 to svn://

ded01499 03/03/2009 08:24 PM Michael Niedermayer

Replace two 'return AVERROR;' by continue. The latter are nicer
and the EAGAIN were just added as example not because they made sense.

Originally committed as revision 17783 to svn://

d2718187 02/21/2009 11:54 PM Baptiste Coudurier

parse aac extradata to fetch channels and sample rate, patch from Netgem

Originally committed as revision 17506 to svn://

0e9602ef 02/19/2009 12:19 PM Peter Ross

FLV demuxer: return AVERROR_EOF upon detection of end of file.

Originally committed as revision 17457 to svn://

c1023470 02/16/2009 04:09 PM Benoit Fouet

Add a context to av_log() calls.

Originally committed as revision 17375 to svn://

9a354fe3 02/02/2009 04:05 PM Stefan de Konink

Implement the reading of the video bitrate of flv movies out of the meta data,
to have the total bitrate available in the avformat structures.
Patch by Stefan de Konink stefan konink de

Originally committed as revision 16943 to svn://

a308737b 01/22/2009 12:08 PM Michael Niedermayer

Use EAGAIN return, primarely intended as example of EAGAIN useage.

Originally committed as revision 16719 to svn://

406792e7 01/19/2009 03:46 PM Diego Biurrun

cosmetics: Remove pointless period after copyright statement non-sentences.

Originally committed as revision 16684 to svn://

2f3d7ea9 12/21/2008 08:56 PM Michael Niedermayer

Fix detection of audio codec in K70707-ARIA229.flv.
Fixes issue760.

Originally committed as revision 16254 to svn://

ebd61055 11/16/2008 02:56 AM Baptiste Coudurier

set pts in flv demuxer

Originally committed as revision 15841 to svn://

8ff8de73 10/28/2008 11:49 PM Andrew Wason

Fix endless loop when opening corrupt FLV files (issue 699).

Patch by Andrew Wason, rectalogic A rectalogic D com

Originally committed as revision 15738 to svn://

7f8cd075 10/24/2008 11:06 PM Baptiste Coudurier

simplify sample rate code, flv_set_audio_codec already overrides it for nellymoser 8khz

Originally committed as revision 15687 to svn://

f96d0eef 10/24/2008 06:36 PM Baptiste Coudurier

force sample rate to 16khz for speex in flv, fix speexaudio.flv

Originally committed as revision 15678 to svn://

4fe8a452 10/24/2008 04:46 PM Pascal Massimino

fix for >2GB flv files

Originally committed as revision 15677 to svn://

88cb61bb 10/18/2008 12:08 PM Alexander Wichers

8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu

Originally committed as revision 15632 to svn://

dd1c8f3e 09/08/2008 02:24 PM Luca Abeni

Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may...

ae58b54b 08/29/2008 10:10 PM Baptiste Coudurier

skip empty flv data packets, fix issue #602

Originally committed as revision 15042 to svn://

3d9aecb0 08/29/2008 10:07 PM Baptiste Coudurier

factorize packet skip code

Originally committed as revision 15041 to svn://

6298eb81 08/29/2008 10:03 PM Baptiste Coudurier

simplify size handling code

Originally committed as revision 15040 to svn://

77b04435 08/29/2008 05:06 PM Baptiste Coudurier

speex in flv demuxing

Originally committed as revision 15028 to svn://

22e7d9cc 07/31/2008 02:26 AM Baptiste Coudurier

skip flv video info / command frame packets, fix issue #546

Originally committed as revision 14480 to svn://

bde15e74 06/03/2008 04:20 PM Stefano Sabatini

Make long_names in lavf/lavdev optional depending on CONFIG_SMALL.
patch by Stefano Sabatini, stefano.sabatini-lala
along with some spelling/consistency fixes for the long names by me

Originally committed as revision 13649 to svn://

04fd3e81 05/26/2008 10:01 PM Baptiste Coudurier

aac and h264 in flv demuxing

Originally committed as revision 13439 to svn://

7ef94d22 05/23/2008 09:51 PM Baptiste Coudurier

in flv this field is dts finally

Originally committed as revision 13268 to svn://

19719bc6 05/23/2008 09:47 PM Baptiste Coudurier

flv use 32 bit pts

Originally committed as revision 13267 to svn://

07a47ae2 04/25/2008 09:08 AM Baptiste Coudurier

pts are unsigned according to specs, fix negative pts when 32bit pts are used

Originally committed as revision 12949 to svn://

780169c3 04/14/2008 12:25 PM Michael Niedermayer

Remove useless code.

Originally committed as revision 12814 to svn://

b41497e9 04/14/2008 12:24 PM Michael Niedermayer

Recommit r12809
Setting AVFMTCTX_NOHEADER if streams<2 so phantom streams are found.
After seeking bug has been fixed.

Originally committed as revision 12813 to svn://

0366654e 04/14/2008 12:22 PM Michael Niedermayer

Use generic seeking code for flv. The removed code was a buggy duplicate.

Originally committed as revision 12812 to svn://

26d95a1e 04/14/2008 12:10 PM Michael Niedermayer

revert r12809
Setting AVFMTCTX_NOHEADER if streams<2 so phantom streams are found.
As it unexpectly breaks seek regression tests.

Originally committed as revision 12811 to svn://

a33cfa30 04/13/2008 11:47 PM Michael Niedermayer

Stop find_stream_info() searching for further streams if 2 streams have
been found.

Originally committed as revision 12810 to svn://

749c9201 04/13/2008 10:58 PM Michael Niedermayer

Setting AVFMTCTX_NOHEADER if streams<2 so phantom streams are found.

Originally committed as revision 12809 to svn://

c04c52d3 03/20/2008 11:02 AM Pascal Massimino

Additional checks for strange num_val in FLV metadata
Avoids some "Unsupported audio codec (6)" message in FLVs, e.g.
Example of such problematic bitstream is 'bad_codec6.flv'
in ftp's /incoming directory.

Originally committed as revision 12510 to svn://

58293e57 02/24/2008 01:04 AM Michael Niedermayer

Fix issue357
Do what the spec says, insane or not:
Format 0 (uncompressed) and Format 3 (uncompressed little-endian) are similar. Both encode
uncompressed audio samples. For 8-bit samples, the two formats are identical. For 16-bit
samples, the two formats differ in byte ordering. In Format 0, 16-bit samples are encoded and...

44de39f9 02/24/2008 12:57 AM Michael Niedermayer

flv/swf do not have a big endian codec id, they only support
little endian and native endian.

Originally committed as revision 12183 to svn://

107b5f93 12/20/2007 11:22 AM Benjamin Larsson


Originally committed as revision 11285 to svn://

7b76c224 12/20/2007 11:21 AM Benjamin Larsson

Correctly handle FLV_CODECID_NELLYMOSER_8HZ_MONO files

Originally committed as revision 11284 to svn://

899681cd 11/21/2007 07:41 AM Björn Axelsson

Use dynamically allocated ByteIOContext in AVFormatContext

patch by: Björn Axelsson, bjorn d axelsson a intinor d se
thread: [PATCH] Remove static ByteIOContexts, 06 nov 2007

Originally committed as revision 11071 to svn://

018b6fb4 11/16/2007 12:09 AM Alex Beregszaszi

Honor the 8bit extension (now 32bit instaed 24bit) of the pts field introduced in FLV specification v9.

Originally committed as revision 11043 to svn://

c8652b57 10/31/2007 10:10 PM Michael Niedermayer

support flv with invalid header
fixes issue43

Originally committed as revision 10887 to svn://

6f910bcf 10/31/2007 09:35 PM Michael Niedermayer

factorize stream creation

Originally committed as revision 10886 to svn://

636b13c5 10/15/2007 04:26 PM Benjamin Larsson

Nellymoser ASAO decoder

Originally committed as revision 10741 to svn://

99904603 09/25/2007 07:30 PM Aurelien Jacobs

use the VP6A codec

Originally committed as revision 10578 to svn://

df63f130 09/25/2007 07:25 PM Aurelien Jacobs

revert r10527
There is now a proper vp6a codec, so no need for this hack anymore.

Originally committed as revision 10577 to svn://

f84c3573 09/18/2007 03:36 PM Aurelien Jacobs

Add support for VP6A in flv.
Those files really contain 2 standard VP6 video streams:
- the "normal" video stream
- the alpha plan video stream (which is a standard
YV12 video with it's U an V plans all set to 0)
closes issue166

Originally committed as revision 10527 to svn://

6f3e0b21 07/19/2007 03:23 PM Panagiotis Issaris

Replace all occurrences of AVERROR_IO with AVERROR.

Originally committed as revision 9760 to svn://

769e10f0 07/19/2007 03:21 PM Panagiotis Issaris

Replace all occurrences of AVERROR_NOMEM with AVERROR.

Originally committed as revision 9759 to svn://

7b94177e 07/05/2007 10:37 AM Diego Biurrun

Group all copyright and author notices together.

Originally committed as revision 9483 to svn://

57004ff1 04/15/2007 01:51 PM Aurelien Jacobs

add an enum for need_parsing

Originally committed as revision 8742 to svn://

87e87886 04/08/2007 11:34 AM Michael Niedermayer

allocate 32 extra bytes at the end of the probe buffer and remove most probe buf_size checks

Originally committed as revision 8677 to svn://

031311cb 03/07/2007 01:52 AM Alex Beregszaszi

workaround for broken flvtoolized files

Originally committed as revision 8277 to svn://

683ab79c 01/23/2007 03:38 PM Michael Niedermayer

flv follows in movs footsteps and has random trash in the width/height fields

Originally committed as revision 7668 to svn://

74248229 01/23/2007 03:23 PM Michael Niedermayer

improve probe and give it the max score

Originally committed as revision 7667 to svn://

428cc588 12/12/2006 12:29 PM Allan Hsu

add FLV decoder metadata parsing
patch by Allan Hsu % allan A counterpop P net %
date: Dec 12, 2006 12:19 PM
subject: Re: [Ffmpeg-devel] [PATCH] FLV decoder metadata reading

Originally committed as revision 7286 to svn://

15f14fc7 12/10/2006 05:53 PM Michael Niedermayer

move duration finding code into read_packet() so it can be skiped if duration has already been set

Originally committed as revision 7272 to svn://

17fcb170 12/10/2006 05:38 PM Michael Niedermayer

use amf_get_string()

Originally committed as revision 7271 to svn://