summaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
Commit message (Collapse)AuthorAge
* 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.
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* lavc: Drop deprecated destruct_packet related functionsVittorio Giovara2015-08-28
| | | | Deprecated in 10/2012.
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | This applies to every library where performance is not critical.
* rmdec: Improve message for demux errorCarl Eugen Hoyos2015-03-08
| | | | | | | Use correct context, reduce log level, don't assume it is a video stream, and print the tag of the unknown stream. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* rmdec: Check memory allocations from ff_rm_alloc_rmstream()Hugo Beauzée-Luyssen2015-02-17
| | | | Bug-Id: CID 1257835
* avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
|
* 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>
* rmdec: stricter error check to avoid theoretical unitialized useVittorio Giovara2014-10-21
| | | | | CC: libav-stable@libav.org Bug-Id: CID 90558
* rmdec: check av_new_packet return valueVittorio Giovara2014-10-21
| | | | | CC: libav-stable@libav.org Bug-Id: CID 733714
* Replace av_malloc() and memset(0) by av_mallocz()Diego Biurrun2014-06-22
|
* rmdec: do not export anything to AVCodecContext.codec_nameAnton Khirnov2014-05-01
| | | | | That field will be deprecated and the value that is written there is not particularly useful.
* lavf: more correct printf format specifiersDiego Biurrun2014-03-11
|
* rmdec: Validate the fps valueMartin Storsjö2013-09-18
| | | | | | | | Abort if it is invalid if strict error checking has been requested. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: Fix ATRAC codec name spellingDiego Biurrun2013-09-02
|
* Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-02
|
* rmdec: Use the AVIOContext given as parameter in rm_read_metadata()Michael Niedermayer2013-07-07
| | | | | | | | | | | | | | | This fixes crashes when playing back certain RealRTSP streams. When invoked from the RTP depacketizer, the full realmedia demuxer isn't invoked, but only certain functions from it, where a separate AVIOContext is passed in as parameter (for the buffer containing the data to parse). The functions called from within those entry points should only be using that parameter, not s->pb. In the depacketizer case, s is the RTSP context, where ->pb is null. Cc: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: remove disabled FF_API_R_FRAME_RATE cruftAnton Khirnov2013-03-11
|
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.hJustin Ruggles2012-11-28
|
* rmdec: set channel layout for RA version 3Justin Ruggles2012-11-12
|
* rmdec: Move SIPR code shared with Matroska demuxer to a separate fileDiego Biurrun2012-10-15
|
* avformat: Convert some commented-out printf/av_log instances to av_dlogDiego Biurrun2012-10-01
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* avformat: Drop pointless "format" from container long namesDiego Biurrun2012-07-30
|
* lavf: deprecate r_frame_rate.Anton Khirnov2012-07-29
| | | | | | | | | | | | | | | | | | | | According to its description, it is supposed to be the LCM of all the frame durations. The usability of such a thing is vanishingly small, especially since we cannot determine it with any amount of reliability. Therefore get rid of it after the next bump. Replace it with the average framerate where it makes sense. FATE results for the wtv and xmv demux tests change. In the wtv case this is caused by the file being corrupted (or possibly badly cut) and containing invalid timestamps. This results in lavf estimating the framerate wrong and making up wrong frame durations. In the xmv case the file contains pts jumps, so again the estimated framerate is far from anything sane and lavf again makes up different frame durations. In some other tests lavf starts making up frame durations from different frame.
* avcodec: add a cook parser to get subpacket durationJustin Ruggles2012-04-20
| | | | Fixes jittery video playback of rm files with cook audio.
* RealAudio Lossless decoderKostya Shishkov2012-03-19
|
* rmdec: Honor .RMF tag size rather than assuming 18.Alex Converse2012-03-02
|
* rmdec: adjust printf format string specifier to fix warningDiego Biurrun2012-03-01
| | | | libavformat/rmdec.c:383: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘int64_t’
* rm: prevent infinite loops for index parsing.Ronald S. Bultje2012-02-22
| | | | | | | | | Specifically, prevent jumping back in the file for the next index, since this can lead to infinite loops where we jump between indexes referring to each other, and don't read indexes that don't fit in the file. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.Ronald S. Bultje2012-02-22
| | | | | | | | | We read sub_packet_h / 2 packets per line of data (during deinterleaving), which equals zero if sub_packet_h <= 1, thus causing us to not read any data, leading to an infinite loop. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* cosmetics: drop some pointless parenthesesDiego Biurrun2012-01-07
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* rmdec: don't set codec timebase.Anton Khirnov2011-11-30
| | | | | It's not supposed to be set outside of lavc. Set r_frame_rate instead.
* rdt: Set AVFMT_NOFILE on ff_rdt_demuxerMartin Storsjö2011-11-07
| | | | | | | | | | This makes rdt work again, which has been broken since 603b8bc2a109978c8499b06d2556f1433306eca7. This commit made opening a demuxer without a file (or in this case, with a filename which can't be opened) fail, unless the demuxer actually declared AVFMT_NOFILE. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf,lavd: replace av_new_stream->avformat_new_stream part I.Anton Khirnov2011-10-19
| | | | | Trivial replacements with sed are done in this commit: sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
* rmdec: Reject invalid deinterleaving parametersLaurent Aimar2011-09-19
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rmdec: use the deinterleaving mode and not the codec when creating audio ↵Laurent Aimar2011-09-19
| | | | | | | | packets. It prevents crashes due to non initialized fields. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Use deinterleavers for demangling audio packets in RealMedia.Kostya Shishkov2011-08-27
| | | | | | | | | | Unlike other containers RealMedia stores its audio packets in scrambled form, with interleaver ID preceeding audio codec ID. Currently deinterleaving decision is tied to the codec while it's possible to have non-default deinterleaver with audio codec (like Int0 deinterleaver instead of specific one for Sipro). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* rmdec: parse FPS in RealMedia properlyKostya Shishkov2011-08-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Use parsers for RealVideo 3/4 to determine correct PTSKostya Shishkov2011-08-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* rmdec: correct DTS calculation in RealMedia container.Kostya Shishkov2011-08-17
| | | | | | | | First, container stores only DTS and not PTS as it was believed. Second, multiple frames in a packet store timestamp instead of position after the frame length. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Remove redundant and dubious video codec detection by its extradataKostya Shishkov2011-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavf: use designated initialisers for all (de)muxers.Anton Khirnov2011-07-17
| | | | It's more readable and less prone to breakage.
* rmdec: remove useless ap parameter from rm_read_header_old()Anton Khirnov2011-07-17
|
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-08
|
* Remove unused variablesMans Rullgard2011-06-02
|