summaryrefslogtreecommitdiff
path: root/libavformat/rdt.c
Commit message (Collapse)AuthorAge
* Mark read-only tables as staticDiego Biurrun2016-05-05
|
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* rdt: Use a separate variable to clarify the different value namespacesMartin Storsjö2015-03-05
| | | | | | | | The original flags variable contains rtpdec flags, while the rmflags variable contains RM flag bits which have a completely different definition. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Rename the free method to closeMartin Storsjö2015-02-24
| | | | | | | | | Many of these functions were named foo_free_context, and since the functions no longer should free the context itself, only allocated elements within it, the previous naming was slightly misleading. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Free depacketizers if the init function failedMartin Storsjö2015-02-24
| | | | | | | | | | | | | | This is different from how it is handled in codecs/demuxers/muxers though (where the close function isn't called if the open function failed), but since the number of depacketizers that have an .init function is quite limited, this is easy to change. The main point is that if the init function failed, we shouldn't try to use that depacketizer at all - this makes sure that the parse function doesn't need to check for the things that were initialized in the init function. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Don't free the payload context in the .free functionMartin Storsjö2015-02-24
| | | | | | | | | | | | | | This makes it more consistent with depacketizers that don't have any .free function at all, where the payload context is freed by the surrounding framework. Always free the context in the surrounding framework, having the individual depacketizers only free any data they've specifically allocated themselves. This is similar to how this works for demuxer/muxers/codecs - a component shouldn't free the priv_data that the framework has allocated for it. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Use .init instead of .alloc to set default valuesMartin Storsjö2015-02-24
| | | | | | The ugly error handling in rdt gets improved in a later commit. Signed-off-by: Martin Storsjö <martin@martin.st>
* rmdec: Check memory allocations from ff_rm_alloc_rmstream()Hugo Beauzée-Luyssen2015-02-17
| | | | Bug-Id: CID 1257835
* rm: Use the correct codec_data_size signednessLuca Barbato2014-12-04
| | | | | | | | | The function takes a size and not an offset. CC: libav-stable@libav.org Sample-Id: rm_deadlock.rm Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rdt: check malloc callsNidhi Makhijani2014-05-24
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: do not export av_register_{rtp,rdt}_dynamic_payload_handlers from ↵Anton Khirnov2013-10-28
| | | | shared objects
* lavf: Reset the entry count and allocation size variables on av_reallocp ↵Martin Storsjö2013-09-26
| | | | | | | | | | | | | | failures When av_reallocp fails, the associated variables that keep track of the number of elements in the array (and in some cases, the separate number of allocated elements) need to be reset. Not all of these might technically be needed, but it's better to reset them if in doubt, to make sure variables don't end up conflicting. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avformat: Drop unnecessary ff_ name prefixes from static functionsDiego Biurrun2013-04-30
|
* rtpdec: Pass the sequence number to depacketizersMartin Storsjö2012-12-21
| | | | | | This allows depacketizers to figure out if packets have been lost. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* rdt: remove workaround for infinite loop with aacJustin Ruggles2012-03-05
| | | | avformat_find_stream_info() no longer hangs while waiting for AAC frame_size
* Replace all uses of av_close_input_file() with avformat_close_input().Anton Khirnov2011-12-12
|
* Fix a bunch of common typos.Diego Biurrun2011-12-11
|
* rdt: Check the return value of avformat_openMartin Storsjö2011-11-07
| | | | | | | If it failed, return NULL. This avoids trying to use an half-initialized RDTDemuxContext. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: replace av_new_stream->avformat_new_stream part II.Anton Khirnov2011-10-19
| | | | | | | | 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.
* Deprecate av_open_input_* and remove their uses.Anton Khirnov2011-06-16
| | | | Deprecate the last remaining member of AVFormatParameters.
* rtp: Rename the open/close functions to alloc/freeMartin Storsjö2011-04-24
| | | | | | | This avoids clashes if we internally want to override the global open function. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes senseAnton Khirnov2011-03-16
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: add avio_tell macro as a replacement for url_ftellAnton Khirnov2011-03-04
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* lavf: replace all uses of url_fskip with avio_seekAnton Khirnov2011-03-01
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefix for url_fseekAnton Khirnov2011-03-01
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefixes for get_* functionsAnton Khirnov2011-02-21
| | | | | | | | | | | | | | 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>
* avio: rename av_alloc_put_byte -> avio_alloc_context for consistencyAnton Khirnov2011-02-21
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: move init_put_byte() to a new private header and rename itAnton Khirnov2011-02-20
| | | | | | | init_put_byte should never be used outside of lavf, since sizeof(AVIOContext) isn't part of public ABI. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-20
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* rtsp/rdt: Assign the RTSPStream index to AVStream->idMartin Storsjö2011-02-11
| | | | | | | | | | | | This is used for mapping AVStreams back to their corresponding RTSPStream. Since d9c0510, the RTSPStream pointer isn't stored in AVStream->priv_data any longer, breaking this mapping from AVStreams to RTSPStreams. Also, we don't need to clear the priv_data in rdt cleanup any longer, since it isn't set to duplicate pointers. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Remove final semicolon from some macrosMans Rullgard2011-02-10
| | | | | | This avoids double semicolons after macro expansion. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | 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.
* rtsp/rtpdec: Allow rtp_parse_packet to take ownership of the packet bufferMartin Storsjö2010-10-01
| | | | | | | Do the same change for ff_rdt_parse_packet, too, to keep the interfaces similar. Originally committed as revision 25289 to svn://svn.ffmpeg.org/ffmpeg/trunk
* get rid of MAX_STREAMS limit in RDTAurelien Jacobs2010-08-09
| | | | Originally committed as revision 24751 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove angular brackets from Doxygen comments; Doxygen confuses them for HTML.Diego Biurrun2010-07-02
| | | | Originally committed as revision 23991 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove dead initialization.Ronald S. Bultje2010-04-02
| | | | Originally committed as revision 22780 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a lowercase parameter to ff_data_to_hexMartin Storsjö2010-03-25
| | | | Originally committed as revision 22665 to svn://svn.ffmpeg.org/ffmpeg/trunk
* handler can be NULL if we did not support this dynamic format (codec).Ronald S. Bultje2010-01-07
| | | | | | | Fixes issue 1658 (the crasher), although the format itself is obviously still unsupported. Originally committed as revision 21078 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Don't use a pointer-to-flags/timestamp in ff_rm_parse_packet(); the functionRonald S. Bultje2009-07-30
| | | | | | | | | | used to return packet data, which might update the flags/timestamp to be used for the next packet data returned by the demuxer. However, that was separated out into a new function, and the flags/timestamp are thus never updated within ff_rm_parse_packet() anymore, and thus do not need to be a pointer. Originally committed as revision 19539 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use named initializers and use new/free_context() instead of extradata()Colin McQuillan2009-07-27
| | | | | | for context allocators. Patch by Colin McQuillan m niloc googlemail com. Originally committed as revision 19518 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-13
| | | | Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Reindent after r18010.Ronald S. Bultje2009-03-16
| | | | Originally committed as revision 18011 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove packet returning in ff_rm_parse_packet() if we're using the packetRonald S. Bultje2009-03-16
| | | | | | | cache, since this can already be accessed through ff_rm_retrieve_cache(). See "[PATCH] rmdec.c: remove cache access duplication" thread. Originally committed as revision 18009 to svn://svn.ffmpeg.org/ffmpeg/trunk