summaryrefslogtreecommitdiffstats
path: root/libavformat/flvdec.c
Commit message (Collapse)AuthorAgeFilesLines
* flvdec: Do not default to a video and audio streamUwe L. Korn2014-06-011-8/+0
| | | | | | | | | If no streams were indicated in the FLV header, do not automatically allocate by default a video and an audio stream. Instead, in the case that the header did not indicate the presence of any data, allocate no stream until data actually arrives for one type. Signed-off-by: Martin Storsjö <martin@martin.st>
* flv: Do not mangle dts values for negative ctsLuca Barbato2014-04-231-2/+0
| | | | Some applications really mean to send negative pts.
* flv: Warn only onceLuca Barbato2014-04-231-1/+1
| | | | No point in sending the message multiple time.
* flv: Improve log messagesLuca Barbato2014-04-231-3/+3
| | | | | Messages should start with a capital letter and possibly end with a "." if they are statements.
* flv: Workaround for buggy Omnia A/XE encoderBenjamin Larsson2014-01-111-0/+6
| | | | | | | | | The Omnia A/XE encoder writes the explicit extra data incorrectly and wrongly disables parametric stereo. Truncating the extra data by setting the size to 2 works around this. The AAC extra data parser will then only parse the correct parts. Bug-id: 599
* flv: Make onTextData parsing robustLuca Barbato2013-09-221-19/+69
| | | | Certain streaming servers do not preserve the order of the fields.
* flv: Do not export datastream as metadataLuca Barbato2013-09-161-1/+2
| | | | It is used internally.
* flv: Fix the help stringLuca Barbato2013-08-271-1/+1
|
* flvdec: Eliminate completely silly gotoDiego Biurrun2013-08-011-11/+7
|
* flvdec: K&R formatting cosmeticsDiego Biurrun2013-08-011-323/+386
|
* flvdec: Fix = vs. == typo in sample rate checkDiego Biurrun2013-08-011-1/+1
|
* Remove unreachable returnsDiego Biurrun2013-07-271-4/+0
|
* flvdec: read audio sample size and channels metadataJustin Ruggles2013-03-281-1/+8
| | | | | This is needed in order for the FLV demuxer not to detect a codec change when using the "flv_metadata" option.
* flvdec: use the correct audio codec id when parsing metadataJustin Ruggles2013-03-281-1/+2
|
* flvdec: Check the return value of a mallocMartin Storsjö2013-03-021-2/+6
| | | | | | | | | | The callers of this function can't report errors sanely. If this one malloc fails, don't write the extradata byte, make sure we try to malloc it the next time we're called instead, and make sure we still consume the input data byte. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Don't read the VP6 header byte when setting codec type based on metadataMartin Storsjö2013-03-021-7/+9
| | | | | | | | | This header byte is only present when actually reading a VP6 frame, not when reading the codec type field in the metadata. This potential bug has been present since 5b54a90c. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: set channel layoutJustin Ruggles2012-11-121-0/+4
|
* flvdec: always set AVFMTCTX_NOHEADER.Anton Khirnov2012-09-111-4/+1
| | | | New streams may be created at any time, e.g. on codec change.
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-041-1/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-42/+42
|
* Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-301-1/+1
|
* flvdec: remove spurious use of stream idLuca Barbato2012-07-291-8/+7
| | | | We match streams by codec id now.
* flvdec: Treat all nellymoser versions as the same codecMartin Storsjö2012-07-051-4/+0
| | | | | | | | This avoids creating new AVStreams for them when switching between different variants of them, since we can handle changes between different sample rates of nellymoser within the same stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: optionally trust the metadataLuca Barbato2012-07-051-0/+35
| | | | | In certain conditions video or audio frames might appear way later in the stream.
* flvdec: initial stream switch supportLuca Barbato2012-07-031-4/+91
| | | | Codec change midstream gets mapped to a separate stream.
* flv: add support for G.711Damien Fetis2012-06-281-0/+8
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* flvdec: remove incomplete, disabled seeking codeRonald S. Bultje2012-06-191-30/+0
|
* flv: support stream text data as onTextDataLuca Barbato2012-06-031-15/+91
| | | | | | | Adobe specifies onTextData as the standard message to use to deliver text information. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* flvdec: Make sure sample_rate is set to the updated valueMartin Storsjö2012-05-231-2/+2
| | | | | | | | | | | | | | | | The sample_rate variable is used for checks for audio format changes at the end of the function. This fixes cases where the sample rate was set from the codec id by flv_set_audio_codec (as for nellymoser 8 kHz/16 kHz), so the value set to last_sample_rate wasn't equal to sample_rate at this point. This caused the demuxer otherwise reports a spurious change to 5512 Hz and back to the correct one. Updating channels in the same way is only done for consistency. Currently, flv_set_audio_codec doesn't update that value. Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-061-4/+4
| | | | | | | 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>
* flvdec: Remove the now redundant check for known broken metadata creatorMichael Niedermayer2012-02-271-12/+0
| | | | | | The index validation identifies these indexes as broken. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Validate index entries added from metadata while readingMartin Storsjö2012-02-271-3/+52
| | | | | | | | | | | By validating the index entries while reading, we don't need to seek at startup to validate the entries. If the error in the index entries is not pointing to (our definition of) the start of packets, and there is an index entry pointing at some of the first packets after the metadata, the invalid index can be discarded almost immediately. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Ignore the index if the ignidx flag is setMartin Storsjö2012-02-221-0/+3
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Fix indentationMartin Storsjö2012-02-221-2/+3
| | | | | | Also split a long line. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: remove the pointless value field from flv and iv8Anton Khirnov2012-01-311-1/+0
| | | | The demuxers don't use it in any way.
* flvdec: Interpret a toplevel 'object' type metadata item as normal metadata, tooMartin Storsjö2012-01-301-7/+3
| | | | | | | | | | | | Previously, we've only passed the key string on to the recursive amf_parse_object for the mixedarray type, not for 'object'. By passing the key string on, the recursive amf_parse_object can store the amf objects as metadata. This kind of data was seen in data from XSplit Broadcaster, received over RTMP via Wowza. This patch allows reading this metadata. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-271-2/+1
|
* flvdec: Fix compiler warning for uninitialized variablesJean First2012-01-041-1/+1
| | | | | | | These can't be used uninitialized in practice, but the compiler doesn't realize it. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Add param change side data if the sample rate or channels have changedMartin Storsjö2011-12-211-6/+25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Export new AAC/H.264 extradata as side data on the next packetMartin Storsjö2011-12-211-0/+39
| | | | | | | | | | | | | | | | | | Compared to just overwriting the old extradata, this has the advantage of letting the decoder know exactly when the extradata changed (otherwise it is changed immediately when the new extradata packet is demuxed, even if there's old queued packets awaiting to be decoded). This makes it easier for decoders to actually react to the change, so they won't have to inspect the extradata for each packet to see if it might have changed. This works when sequentially playing a file with sample rate changes, but if seeking past a new extradata packet in the file, it obviously doesn't work properly. That case doesn't work in flash player either, so it's probably ok not to handle it. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavu: replace int/float punning functionsMans Rullgard2011-12-111-3/+3
| | | | | | | | | | | | | | | | | | The existing functions defined in intfloat_readwrite.[ch] are both slow and incorrect (infinities are not handled). This introduces a new header with fast, inline conversion functions using direct union punning assuming an IEEE-754 system, an assumption already made throughout the code. The one use of Intel/Motorola extended 80-bit format is replaced by simpler code sufficient under the present constraints (positive normal values). The old functions are marked deprecated and retained for compatibility. Signed-off-by: Mans Rullgard <mans@mansr.com>
* latmdec: fix audio specific config parsingJanne Grunau2011-12-031-1/+1
| | | | | | | | | Pass the correct size in bits to mpeg4audio_get_config and add a flag to disable parsing of the sync extension when the size is not known. Latm with AudioMuxVersion 0 does not specify the size of the audio specific config. Data after the audio specific config can be misinterpreted as sync extension resulting in random and wrong configs.
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-301-1/+2
| | | | It's supposed to be called only from (de)muxers.
* flvdec: Do not call parse_keyframes_index with a NULL streamReimar Döffinger2011-10-221-2/+3
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.Anton Khirnov2011-10-201-1/+1
| | | | | Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and ff_copy_pce_data
* lavf: replace av_new_stream->avformat_new_stream part II.Anton Khirnov2011-10-191-1/+2
| | | | | | | | Manual replacements are done in this commit. In many cases, the id is some constant made up number (e.g. 0 for video and 1 for audio), which is then not used in the demuxer for anything. Those ids are removed.
* flvdec: Don't export metadata entries that aren't proper metadataMartin Storsjö2011-10-121-0/+14
| | | | | | | | | This avoids writing these entries doubly if transcoding from flv to flv, since the muxer blindly writes any and all metadata keys set, in addition to the fixed fields that the muxer always writes. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Split out setting of numeric fields from storing metadataMartin Storsjö2011-10-121-5/+9
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Check for overflow before allocating arraysMichael Niedermayer2011-09-251-0/+3
| | | | | | | 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>
* flvdec: Fix invalid pointer deferences when parsing indexLaurent Aimar2011-09-241-2/+2
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
OpenPOWER on IntegriCloud