summaryrefslogtreecommitdiff
path: root/libavformat/rtmppkt.c
Commit message (Collapse)AuthorAge
* Merge commit '84a125c4c28f3e3e215d2e6c32f7f0ec43bbc04c'Michael Niedermayer2013-10-14
|\ | | | | | | | | | | | | * commit '84a125c4c28f3e3e215d2e6c32f7f0ec43bbc04c': rtmp: Allocate the prev_pkt arrays dynamically Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Allocate the prev_pkt arrays dynamicallyMartin Storsjö2013-10-14
| | | | | | | | | | | | | | | | | | | | Normally, all channel ids are between 0 and 10, while they in uncommon cases can have values up to 64k. This avoids allocating two arrays for up to 64k entries (at a total of over 6 MB in size) each when most of them aren't used at all. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '32a414f316c7f0eea877370e3f9d9f25afbf5da2'Michael Niedermayer2013-09-23
|\| | | | | | | | | | | | | * commit '32a414f316c7f0eea877370e3f9d9f25afbf5da2': rtmp: Support AMF_DATA_TYPE_MIXEDARRAY Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Support AMF_DATA_TYPE_MIXEDARRAYLuca Barbato2013-09-22
| | | | | | | | | | | | | | | | | | And fix the AMF_DATA_TYPE_ARRAY parsing while at it. A MIXEDARRAY type, as the ARRAY, store the number of elements in an uint32 before the list. The ARRAY is strict and does not have an OBJECT terminator, MIXEDARRAY behaves like an OBJECT type and a different than stated number of element can be present.
* | Merge commit '8583b14252deac71136f1dec231910abab0ba503'Michael Niedermayer2013-09-18
|\| | | | | | | | | | | | | * commit '8583b14252deac71136f1dec231910abab0ba503': rtmp: Support reading interleaved chunks. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Support reading interleaved chunks.Josh Allmann2013-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A given packet won't always come in contiguously; sometimes they may be broken up on chunk boundaries by packets of another channel. This support primarily involves tracking information about the data that's been read, so the reader can pick up where it left off for a given channel. As a side effect, we no longer over-report the bytes read if (toread = MIN(size, chunk_size)) == size Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-08-11
|\| | | | | | | | | | | | | * qatar/master: rtmp: Do not misuse memcmp Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Do not misuse memcmpLuca Barbato2013-08-11
| | | | | | | | CC: libav-stable@libav.org
* | Merge commit 'ba5393a609c723ec8ab7f9727c10fef734c09278'Michael Niedermayer2013-08-11
|\| | | | | | | | | | | | | * commit 'ba5393a609c723ec8ab7f9727c10fef734c09278': rtmp: rename data_size to size Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: rename data_size to sizeLuca Barbato2013-08-10
| |
* | Merge commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f'Michael Niedermayer2013-06-02
|\| | | | | | | | | | | | | | | | | | | | | * commit '28306e6d620c109ddd672f7243adfbc2bbb3b18f': network: factor out bind-listening code use my full first name instead of short one in copyrights Conflicts: libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * use my full first name instead of short one in copyrightsKostya Shishkov2013-06-01
| |
* | Merge commit 'e926b5ceb1962833f0c884a328382bc2eca67aff'Michael Niedermayer2013-05-01
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e926b5ceb1962833f0c884a328382bc2eca67aff': avformat: Drop unnecessary ff_ name prefixes from static functions Conflicts: libavformat/audiointerleave.c libavformat/mux.c libavformat/mxfenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Drop unnecessary ff_ name prefixes from static functionsDiego Biurrun2013-04-30
| |
| * rtmp: fix buffer overflows in ff_amf_tag_contents()Xi Wang2013-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A negative `size' will bypass FFMIN(). In the subsequent memcpy() call, `size' will be considered as a large positive value, leading to a buffer overflow. Change the type of `size' to unsigned int to avoid buffer overflow, and simplify overflow checks accordingly. Also change a literal buffer size to use sizeof, and limit the amount of data copied in another memcpy call as well. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtmp: fix multiple broken overflow checksXi Wang2013-01-23
| | | | | | | | | | | | | | | | | | | | | | | | Sanity checks like `data + size >= data_end || data + size < data' are broken, because `data + size < data' assumes pointer overflow, which is undefined behavior in C. Many compilers such as gcc/clang optimize such checks away. Use `size < 0 || size >= data_end - data' instead. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* | rtmp: fix buffer overflows in ff_amf_tag_contents()Xi Wang2013-01-23
| | | | | | | | | | | | | | | | | | | | | | | | A negative `size' will bypass FFMIN(). In the subsequent memcpy() call, `size' will be considered as a large positive value, leading to a buffer overflow. Change the type of `size' to unsigned int to avoid buffer overflow, and simplify overflow checks accordingly. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | rtmp: fix multiple broken overflow checksXi Wang2013-01-23
| | | | | | | | | | | | | | | | | | | | | | | | Sanity checks like `data + size >= data_end || data + size < data' are broken, because `data + size < data' assumes pointer overflow, which is undefined behavior in C. Many compilers such as gcc/clang optimize such checks away. Use `size < 0 || size >= data_end - data' instead. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '33f28a3be3092f642778253d9529dd66fe2a014a'Michael Niedermayer2013-01-01
|\| | | | | | | | | | | | | | | * commit '33f28a3be3092f642778253d9529dd66fe2a014a': rtmp: Add a function for writing AMF strings based on two substrings rtmp: Return a proper error code in handle_invoke_error Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Add a function for writing AMF strings based on two substringsMartin Storsjö2012-12-31
| | | | | | | | | | | | | | This avoids having to concatenate them into one buffer before writing them as AMF. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-02
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: x86: fft: fix imdct_half() for AVX rtmppkt: Add missing libavcodec/bytestream.h include. rtmp: add functions for reading AMF values vc1dec: remove useless #include simple_idct.h dct-test: always link with aandcttab.o vp8: pack struct VP8ThreadData more efficiently x86: remove libmpeg2 mmx(ext) idct functions eamad: Use dsputils instead of a custom bswap16_buf Canopus Lossless decoder Conflicts: Changelog LICENSE libavcodec/avcodec.h libavcodec/cllc.c libavcodec/eamad.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: add functions for reading AMF valuesJordi Ortiz2012-08-02
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Avoid C99 variable declarations within for statements. rtmp: Read and handle incoming packets while writing data doc: document THREAD_TYPE fate variable rtpdec: Don't require frames to start with a Mode A packet avconv: don't try to free threads that were not initialized. Conflicts: doc/fate.texi ffplay.c libavdevice/dv1394.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Read and handle incoming packets while writing dataSamuel Pitoiset2012-06-14
| | | | | | | | | | | | | | | | | | | | | | This makes sure all incoming packets are read and handled (and reacted to) while sending an FLV stream over RTMP to a server. If there were enough incoming data to fill the TCP buffers, this could potentially make things block at unexpected places. For the upcoming RTMPT support, we need to consume all incoming data before we can send the next request. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-25
|\| | | | | | | | | | | | | | | | | | | * qatar/master: movenc: Don't write the 'wave' atom or its child 'enda' for lpcm audio. imc: some cosmetics rtmp: Pass the proper return code in rtmp_handshake rtmp: Check return codes of net IO operations Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Check return codes of net IO operationsSamuel Pitoiset2012-05-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtmp: Return a proper error code instead of -1 rtmp: Check malloc calls rtmp: Check ff_rtmp_packet_create calls lavfi: add audio mix filter flvdec: Make sure sample_rate is set to the updated value tqi: Pass errors from the MB decoder Conflicts: Changelog doc/filters.texi libavcodec/eatqi.c libavfilter/Makefile libavfilter/allfilters.c libavfilter/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Check ff_rtmp_packet_create callsSamuel Pitoiset2012-05-24
| | | | | | | | | | | | | | Check malloc calls used by ff_rtmp_packet_create, unify error handling and pass on error codes. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: x86: cabac: replace explicit memory references with "m" operands avplay: don't request a stereo downmix wmapro: use av_float2int() lavc: avoid invalid memcpy() in avcodec_default_release_buffer() lavu: replace int/float punning functions lavfi: install libavfilter/vsrc_buffer.h Remove extraneous semicolons sdp: Restore the original mp4 format h264 extradata if converted rtpenc: Add support for mp4 format h264 rtpenc: Simplify code by introducing a separate end pointer movenc: Use the actual converted sample for RTP hinting Fix a bunch of common typos. Conflicts: doc/developer.texi doc/eval.texi doc/filters.texi doc/protocols.texi ffmpeg.c ffplay.c libavcodec/mpegvideo.h libavcodec/x86/cabac.h libavfilter/Makefile libavformat/avformat.h libavformat/cafdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/gxfenc.c libavformat/img2.c libavformat/movenc.c libavformat/mpegts.c libavformat/rtpenc_h264.c libavformat/utils.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavu: replace int/float punning functionsMans Rullgard2011-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (40 commits) H.264: template left MB handling H.264: faster fill_decode_caches H.264: faster write_back_* H.264: faster fill_filter_caches H.264: make filter_mb_fast support the case of unavailable top mb Do not include log.h in avutil.h Do not include pixfmt.h in avutil.h Do not include rational.h in avutil.h Do not include mathematics.h in avutil.h Do not include intfloat_readwrite.h in avutil.h Remove return statements following infinite loops without break RTSP: Doxygen comment cleanup doxygen: Escape '\' in Doxygen documentation. md5: cosmetics md5: use AV_WL32 to write result md5: add fate test md5: include correct headers md5: fix test program doxygen: Drop array size declarations from Doxygen parameter names. doxygen: Fix parameter names to match the function prototypes. ... Conflicts: libavcodec/x86/dsputil_mmx.c libavformat/flvenc.c libavformat/oggenc.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Do not include intfloat_readwrite.h in avutil.hMans Rullgard2011-07-03
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (32 commits) doc: create separate section for audio encoders swscale: Remove orphaned, commented-out function declaration. swscale: Eliminate rgb24toyv12_c() duplication. Remove h263_msmpeg4 from MpegEncContext. APIchanges: Fill in git hash for fps_probe_size (30315a8) avformat: Add fpsprobesize as an AVOption. avoptions: Return explicitly NAN or {0,0} if the option isn't found rtmp: Reindent rtmp: Don't try to do av_malloc(0) tty: replace AVFormatParameters.sample_rate abuse with a private option. Fix end time of last chapter in compute_chapters_end ffmpeg: get rid of useless AVInputStream.nb_streams. ffmpeg: simplify managing input files and streams ffmpeg: purge redundant AVInputStream.index. lavf: deprecate AVFormatParameters.channel. libdc1394: add a private option for channel. dv1394: add a private option for channel. v4l2: reindent. v4l2: add a private option for channel. lavf: deprecate AVFormatParameters.standard. ... Conflicts: doc/APIchanges doc/encoders.texi ffmpeg.c libavdevice/alsa-audio.h libavformat/version.h libavutil/opt.c libswscale/rgb2rgb.h libswscale/rgb2rgb_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: ReindentMartin Storsjö2011-05-25
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtmp: Don't try to do av_malloc(0)Martin Storsjö2011-05-25
| | | | | | | | | | | | | | | | | | Some received packets can have size 0. The return value from av_malloc(0) may be NULL, which is ok if the size was 0. On OS X, however, the returned pointer is non-null but leads to crashes when trying to free it. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) ac3enc: move extract_exponents inner loop to ac3dsp avio: deprecate url_get_filename(). avio: deprecate url_max_packet_size(). avio: make url_get_file_handle() internal. avio: make url_filesize() internal. avio: make url_close() internal. avio: make url_seek() internal. avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together avio: make url_write() internal. avio: make url_read_complete() internal. avio: make url_read() internal. avio: make url_open() internal. avio: make url_connect internal. avio: make url_alloc internal. applehttp: Merge two for loops applehttp: Restructure the demuxer to use a custom AVIOContext applehttp: Move finished and target_duration to the variant struct aacenc: reduce the number of loop index variables avio: deprecate url_open_protocol avio: deprecate url_poll and URLPollEntry ... Conflicts: libavformat/applehttp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: make url_write() internal.Anton Khirnov2011-04-04
| |
| * avio: make url_read_complete() internal.Anton Khirnov2011-04-04
| |
| * avio: make url_read() internal.Anton Khirnov2011-04-04
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* 1l trocadero: forgot reference operator on bytestream_get_be32() argumentKostya Shishkov2010-03-07
| | | | Originally committed as revision 22277 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make RTMP send/receive packet functions report number of bytes read or sent.Kostya Shishkov2010-01-30
| | | | Originally committed as revision 21533 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: add an empty line between variable declarations and codeKostya Shishkov2010-01-30
| | | | Originally committed as revision 21532 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove some unused variables, fixes the warnings:Diego Biurrun2009-12-24
| | | | | | | libavformat/rtmppkt.c:350: warning: unused variable ‘i’ libavformat/rtmppkt.c:349: warning: unused variable ‘base’ Originally committed as revision 20917 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Dump RTMP packet contents in debug modeKostya Shishkov2009-12-11
| | | | Originally committed as revision 20799 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Compress headers for output RTMP packets.Sergiy2009-12-04
| | | | | | Patch by Sergiy (piratfmGMAIL) Originally committed as revision 20728 to svn://svn.ffmpeg.org/ffmpeg/trunk
* RTMP packets with one-byte header use previous packet timestamp difference, soSergiy2009-12-03
| | | | | | | track timestamp difference as well. Patch by Sergiy (mail.composeAddress("piratfm","gmail.com")) Originally committed as revision 20714 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Write timestamp deltas, not timestamps, for RTMP packets with partial headerKostya Shishkov2009-12-01
| | | | Originally committed as revision 20686 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Full-header RTMP packets contain real timestamp, others contain timestampKostya Shishkov2009-12-01
| | | | | | | | difference, so make all read packets store absolute timestamp. As a consequence, we don't need to track audio/video timestamps separately any longer in protocol handler. Originally committed as revision 20685 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Write header for RTMP packets with channel_id >= 64 correctlyKostya Shishkov2009-12-01
| | | | Originally committed as revision 20684 to svn://svn.ffmpeg.org/ffmpeg/trunk