summaryrefslogtreecommitdiff
path: root/libavformat/rtmppkt.c
Commit message (Collapse)AuthorAge
* 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.
* 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>
* rtmp: Do not misuse memcmpLuca Barbato2013-08-11
| | | | CC: libav-stable@libav.org
* rtmp: rename data_size to sizeLuca Barbato2013-08-10
|
* use my full first name instead of short one in copyrightsKostya Shishkov2013-06-01
|
* 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: 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>
* rtmp: add functions for reading AMF valuesJordi Ortiz2012-08-02
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* 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>
* rtmp: Check return codes of net IO operationsSamuel Pitoiset2012-05-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* 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>
* 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>
* Do not include intfloat_readwrite.h in avutil.hMans Rullgard2011-07-03
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* 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>
* 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
* Read and write extended timestamps for RTMP packets.Sergiy2009-12-01
| | | | | | Extracted from patch by Sergiy in thread "[PATCH] rtmp-output" Originally committed as revision 20683 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 7l trocadero: reading right into enum variable may cause unwanted effects, useKostya Shishkov2009-12-01
| | | | | | intermediate buffer for reading value instead in RTMP protocol handler. Originally committed as revision 20682 to svn://svn.ffmpeg.org/ffmpeg/trunk
* When searching for AMF object field value, try to find that object firstKostya Shishkov2009-11-22
| | | | | | | instead of assuming it should occur right at given position. This helps finding human-readable error descriptions in RTMP server replies. Originally committed as revision 20575 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use enum instead of integer types where appropriate.Carl Eugen Hoyos2009-11-08
| | | | Originally committed as revision 20482 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Support more than 64 channels in RTMP inputKostya Shishkov2009-10-18
| | | | Originally committed as revision 20270 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Accept RTMP packets with one-byte headerKostya Shishkov2009-10-18
| | | | Originally committed as revision 20269 to svn://svn.ffmpeg.org/ffmpeg/trunk
* RTMP protocol support (as a client)Kostya Shishkov2009-07-31
Originally committed as revision 19556 to svn://svn.ffmpeg.org/ffmpeg/trunk