summaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
Commit message (Collapse)AuthorAge
* Remove old_flags variable, which is a duplicate of the flags variable.Ronald S. Bultje2009-07-30
| | | | Originally committed as revision 19540 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
* Move declarations in sync() closer to where they are used.Michael Niedermayer2009-04-17
| | | | Originally committed as revision 18556 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a @todo with a comment from Kostya so we don't forget to optimize that atRonald S. Bultje2009-03-22
| | | | | | some point in the future. Originally committed as revision 18142 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Don't allow to sync on packets of zero-size length, since these are neverRonald S. Bultje2009-03-21
| | | | | | valid. See "[PATCH] rmdec.c: prevent zero-length packets" thread. Originally committed as revision 18118 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move "- 12" statement up a bit. See "[PATCH] rmdec.c: prevent zero-lengthRonald S. Bultje2009-03-21
| | | | | | packets" thread. Originally committed as revision 18117 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add byte reordering for the SIPRO audio codec. See "rmdec.c: add SIPR codecRonald S. Bultje2009-03-20
| | | | | | try #2" thread. Patch originally by Vladimir Voroshilov. Originally committed as revision 18062 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rmdec: fix crash at end of fileMåns Rullgård2009-03-16
| | | | Originally committed as revision 18018 to svn://svn.ffmpeg.org/ffmpeg/trunk
* More reindent, forgotten in previous commit.Ronald S. Bultje2009-03-16
| | | | Originally committed as revision 18014 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Parse index chunk so that seeking in modern .rm files becomes a lot faster.Ronald S. Bultje2009-03-16
| | | | | | | Has been tested against streamed / non-seekable input and passes make seektest. See "[PATCH] rmdec.c: parse INDX chunk" thread on mailinglist. Originally committed as revision 18013 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
* Mark the first output audio frame as keyframe (separate patch from previous,Ronald S. Bultje2009-03-16
| | | | | | | as requested by Kostya). See "[PATCH] rmdec.c: remove cache access duplication". Originally committed as revision 18010 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
* Reindent after r18005.Ronald S. Bultje2009-03-16
| | | | Originally committed as revision 18007 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge code for packet reading in "old" (.ra, audio-only) Realmedia files andRonald S. Bultje2009-03-16
| | | | | | | the newer (.rm, audio/video) files. See "[PATCH] rmdec.c: merge old/new packet reading code" thread on mailinglist. Originally committed as revision 18005 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix index generation in the way that it was supposed to be used. See theRonald S. Bultje2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | discussion in the ML thread "[PATCH] rmdec.c: merge old/new packet reading code". Over time, this code broke somewhat, e.g. seq was never actually written into (and was thus always 1, therefore the seq condition was always true), whereas it was supposed to be set to the sequence number of the video slice in case the video frame is divided over multiple RM packets (slices). The problem of this is that packets other than those containing the beginning of a video frame would be indexed as well. Secondly, flags&2 is supposed to be true for video keyframes and for these audio packets containing the start of a block. For some codecs (e.g. AAC), that is every single packet, whereas for others (e.g. cook), that is the packet containing the first of a series of scrambled packets that are to be descrambled together. Indexing any of the following would lead to incomplete and thus useless frames. Problem here is that flags would be reset to 2 to indicate that the first packet is ready to be returned, and in addition if no data was left to be returned (which is always true for the first packet), then we wouldn't actually write the index entry anyway. All in all, the idea was good and it probably worked at some point, but that is long ago. This patch should at the very least make it likely for this code to be executed again at the right times, i.e. the way it was originally intended to be used. Originally committed as revision 17993 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Correctly skip complete INDX chunks, i.e. read the 32-bit header correctlyRonald S. Bultje2009-03-10
| | | | | | | | and if the size is broken (20 bytes, header-only), calculate the expected size and skip the index entries anyway. See "[PATCH] rmdec.c: correctly skip indexes" thread. Originally committed as revision 17924 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Prevent (negative) overflow of rm->remaining_len. This evaluation really onlyRonald S. Bultje2009-03-09
| | | | | | | | | | | has two possible outcomes: either len and rm->remaining_len are the same, in which case we care about the outcome and it is zero, or rm->remaining_len is currently not in use and we don't care about the outcome. In that case, len is positive and rm->remaining_len is zero, which leads to a negative result. This is confusing and could eventually lead to a sign-flip if we skip a lot of packets (unlikely, but still). Therefore, just always set it to zero. Originally committed as revision 17919 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Revert to r17908.Ronald S. Bultje2009-03-09
| | | | Originally committed as revision 17918 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Prevent (negative) overflow of rm->remaining_len. This evaluation really onlyRonald S. Bultje2009-03-09
| | | | | | | | | | | has two possible outcomes: either len and rm->remaining_len are the same, in which case we care about the outcome and it is zero, or rm->remaining_len is currently not in use and we don't care about the outcome. In that case, len is positive and rm->remaining_len is zero, which leads to a negative result. This is confusing and could eventually lead to a sign-flip if we skip a lot of packets (unlikely, but still). Therefore, just always set it to zero. Originally committed as revision 17910 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace separate packet parsing for "old_format" .ra files by a call toRonald S. Bultje2009-03-09
| | | | | | | | ff_rm_parse_packet(). See "[PATCH] Make RM demuxer behave better with -an option" thread, which sort-of turned into an aggregate of unrelated rmdec.c cleanups. Originally committed as revision 17909 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move frame discarding out of the ff_rm_parse_packet() loop, and respectRonald S. Bultje2009-03-09
| | | | | | | | | rm->audio_pkt_cnt in case multiple packets should be read before the next syncpoint in the file, so that ffplay -an on a file containing AAC audio works. See "[PATCH] Make RM demuxer behave better with -an option" thread on mailinglist. Originally committed as revision 17908 to svn://svn.ffmpeg.org/ffmpeg/trunk
* remove now useless get_str16() from rmdec.cAurelien Jacobs2009-02-17
| | | | Originally committed as revision 17397 to svn://svn.ffmpeg.org/ffmpeg/trunk
* use new metadata API in rm (de)muxerAurelien Jacobs2009-02-17
| | | | Originally committed as revision 17396 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a context to av_log() calls.Benoit Fouet2009-02-16
| | | | Originally committed as revision 17377 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use more descriptive format long_names.Diego Biurrun2009-02-12
| | | | Originally committed as revision 17184 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Reformat rdt_demuxer AVCodec struct sanely.Michael Niedermayer2009-02-03
| | | | Originally committed as revision 16969 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix build: Add intreadwrite.h and bswap.h #includes where necessary.Diego Biurrun2009-01-11
| | | | Originally committed as revision 16556 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix a compiler warning:Dominique Leuenberger2009-01-07
| | | | | | | | libavformat/rmdec.c:550: warning: assignment makes pointer from integer Patch by Dominique Leuenberger (dominique-ffmpeg-devel A leuenberger D net) Originally committed as revision 16489 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 10l set AVPacket.size to the true size of the returned data instead ofMichael Niedermayer2008-12-31
| | | | | | | the (larger) allocated size. (prevents segfaults due to later failures from 900MB-sized packets, yes fuzzed file not a valid one) Originally committed as revision 16404 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix indention which was off by 1 space.Michael Niedermayer2008-12-31
| | | | Originally committed as revision 16403 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace buffer by AVPacket and avoid a memcpy() for video when the numberMichael Niedermayer2008-12-31
| | | | | | | of allocated slices matches the actual. Audio still does a copy (marked with FIXME in the code so this is not missed). Originally committed as revision 16402 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge videobuf and audiobuf.Michael Niedermayer2008-12-31
| | | | Originally committed as revision 16401 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Simplify the top of rm_assemble_video_frame().Michael Niedermayer2008-12-30
| | | | Originally committed as revision 16400 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a few error checks to rm_assemble_video_frame()Michael Niedermayer2008-12-30
| | | | Originally committed as revision 16399 to svn://svn.ffmpeg.org/ffmpeg/trunk
* All non zero returns of rm_assemble_video_frame() are errors, check thingsMichael Niedermayer2008-12-30
| | | | | | accordingly. Originally committed as revision 16398 to svn://svn.ffmpeg.org/ffmpeg/trunk
* av_free() -> av_freep(), patch by Reimar Doffinger, see discussion inReimar Döffinger2008-12-28
| | | | | | "rmdec.c: double free" thread on mailinglist. Originally committed as revision 16379 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix double free which happens for playback of .rm files after r16365. SeeRonald S. Bultje2008-12-28
| | | | | | | "rmdec.c: double free" discussion on mailinglist, patch with suggestions from Reimar Doffinger. Originally committed as revision 16378 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add audio_pkt_cnt return value to ff_rm_retrieve_cache(). See discussion inRonald S. Bultje2008-12-28
| | | | | | "[PATCH] oops I broke rdt.c" mailinglist thread. Originally committed as revision 16368 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add RMStream object as function argument to public functions so that non-.rmRonald S. Bultje2008-12-28
| | | | | | | | AVStreams can be used to call these public rmdec.c functions as well, as is the case for RDT/RTSP streams. See mailinglist discussion in "[PATCH] rdt.c: don't reuse the same AVStream in both RTSP and RM demuxer" thread. Originally committed as revision 16366 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Implement RMStream stream-specific private data object in the RM demuxer.Ronald S. Bultje2008-12-28
| | | | | | | This allows multiple video or audio streams per .rm file. See mailinglist thread "[PATCH] rmdec.c: implement RMVideo/AudioStream". Originally committed as revision 16365 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use get_buffer() and url_fskip() for some loops of get_byte()s. See ↵Ronald S. Bultje2008-12-14
| | | | | | | | discussion in ML thread "[PATCH] rmdec.c: use get_buffer and skip_bytes instead of loops of get_byte". Originally committed as revision 16139 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Reindent something that looks weird.Ronald S. Bultje2008-12-14
| | | | Originally committed as revision 16138 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Split RMContext into RMDemux/MuxContext and make them private in rmdec/enc.c.Ronald S. Bultje2008-12-13
| | | | | | | | Reason for this is that there are no shared entries in the demuxer/muxer context, making it a mystery as to why it was shared between the two. See "[PATCH] clean rmdemux/muxcontext" patch on mailinglist. Originally committed as revision 16111 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Don't access RMContext directly in rdt.c. Rather, use the return value ofRonald S. Bultje2008-12-13
| | | | | | | | | ff_rm_parse_packet() to indicate whether more audio packets are available in the demuxer from the last RM frame, and save that in the RDT parsing context. See patch/discussion in "[PATCH] rdt.c: don't access RMContext" on ML. Originally committed as revision 16110 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix indenting.Ronald S. Bultje2008-12-11
| | | | Originally committed as revision 16056 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add ByteIOContext argument to public ff_rm_* functions so that we canRonald S. Bultje2008-11-17
| | | | | | | | specify the data source as function argument instead of in s->pb before calling the function. Discussed in ML thread "[PATCH] fix small memleak in rdt.c". Originally committed as revision 15849 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Check sub_packet_size against 0 to avoid div by zero later.Michael Niedermayer2008-10-29
| | | | | | Fixes issue473 Originally committed as revision 15739 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add ok parts to the rm demuxer for SIPRO supportBenjamin Larsson2008-09-26
| | | | Originally committed as revision 15426 to svn://svn.ffmpeg.org/ffmpeg/trunk