summaryrefslogtreecommitdiff
path: root/libavcodec/avpacket.c
Commit message (Collapse)AuthorAge
* avpacket: fix setting AVPacket.data in av_packet_ref()Anton Khirnov2016-05-16
| | | | | | | The data field does not necessarily point to the beginning of the underlying AVBuffer. CC: libav-stable@libav.org
* avpacket: properly reset data/size in av_packet_move_ref()Anton Khirnov2016-02-26
| | | | | It currently just calls av_init_packet(), which does not touch those fields.
* avpacket: fix size check in packet_allocAndreas Cadhalpun2016-01-07
| | | | | | | | | | | The previous check only caught sizes from -AV_INPUT_BUFFER_PADDING_SIZE to -1. This fixes ubsan runtime error: signed integer overflow: 2147483647 + 32 cannot be represented in type 'int' Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avpacket: use ERANGE instead of EOVERFLOWAnton Khirnov2015-12-07
| | | | EOVERFLOW seems to be unavailable on certain platforms.
* avpacket: add a function for wrapping existing data as side dataAnton Khirnov2015-12-06
|
* avpacket: Provide an alloc and a free function for the structLuca Barbato2015-10-26
| | | | | Pave the way for having the size of the AVPacket struct not part of the ABI.
* avpacket: Deprecate av_dup_packetLuca Barbato2015-10-26
| | | | | As documented, `av_dup_packet` is broken by design, `av_packet_ref` matches the AVFrame ref-counted API and can be safely used instead.
* 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: Make AVPacket.duration int64, and deprecate convergence_durationwm42015-09-29
| | | | | | | | | Note that convergence_duration had another meaning, one which was in practice never used. The only real use for it was a 64 bit replacement for the duration field. It's better just to make duration 64 bits, and to get rid of it. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* 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>
* avpacket: Check buffer referenceVittorio Giovara2015-02-17
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1267889
* lavc: add a convenience function for rescaling timestamps in a packetAnton Khirnov2014-06-20
|
* avpacket: fix copying side data in av_packet_copy_props()Anton Khirnov2014-05-19
| | | | | | | | Side data count is incremented by by calling av_packet_new_side_data() in the following loop, setting it explicitly results in the resulting value being twice what it should be. CC: libav-stable@libav.org
* avpacket: Fix error checking in packet_allocMartin Storsjö2013-09-16
| | | | | | | | | | Previously the wrong buffer pointer was checked, when buf instead of *buf was checked. But checking the return value instead is even better. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: Add refcounted api to AVPacketLuca Barbato2013-08-10
| | | | Provide a clean way to manipulate packets.
* Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-02
|
* avpacket: copy side data type and size in av_dup_packetJanne Grunau2013-03-13
|
* 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.
* avpacket: free side data in av_free_packet().Anton Khirnov2013-01-13
| | | | | | | | | Freeing it in av_destruct_packet(), as is done currently, would mean that we allow it to be allocated with other means. But that would make av_packet_new_side_data() unsafe. Side data is not expected to be large, so copying it if required shouldn't be a problem.
* libavcodec: remove av_destruct_packet_nofree()Mans Rullgard2012-09-15
| | | | | | This function was deprecated two major versions ago (2009). Signed-off-by: Mans Rullgard <mans@mansr.com>
* Don't include common.h from avutil.hMartin Storsjö2012-08-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avpacket: fix duplicating side data.Anton Khirnov2012-06-03
| | | | Use correct side data size instead of just zeroed field.
* avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmeticsDiego Biurrun2012-04-12
|
* avpacket: Add a function for shrinking already allocated side dataMartin Storsjö2012-03-01
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* make av_dup_packet() more cautious on allocation failuresKostya Shishkov2011-04-15
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* introduce side information for AVPacketKostya Shishkov2011-04-15
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add a av_grow_packet function, to be used by code that mergesReimar Döffinger2010-11-21
| | | | | | palette and video data packets to get rid of PaletteControl. Originally committed as revision 25776 to svn://svn.ffmpeg.org/ffmpeg/trunk
* indentMichael Niedermayer2009-12-11
| | | | Originally committed as revision 20802 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make sure av_new_packet() initializes the data and destruct pointers.Michael Niedermayer2009-12-11
| | | | | | | Some code does call av_free_packet() on failed av_new_packets(), this prevents the freeing of uninitialized pointers. Originally committed as revision 20801 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Export av_free_packet().Ramiro Polla2009-04-30
| | | | Originally committed as revision 18719 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Get rid of av_destruct_packet_nofree and use NULL instead.Reimar Döffinger2009-04-11
| | | | | | It is still used in comparisons to keep ABI compatibility. Originally committed as revision 18431 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add av_shrink_packet function for use in av_get_packet that reduces pkt->sizeReimar Döffinger2009-04-08
| | | | | | and ensures the following padding is correctly initialized to 0. Originally committed as revision 18378 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move av_packet_*() functions from libavformat/ to libavcodec/, where theThilo Borgmann2009-04-07
AVPacket structure now resides also. Patch by Thilo Borgmann thilo.borgmann googlemail com, see the mailinglist thread "Google Summer of Code participation" for additional discussion. Originally committed as revision 18353 to svn://svn.ffmpeg.org/ffmpeg/trunk