Martin Storsjö
85e8192b85
avpacket: Fix error checking in packet_alloc
...
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>
11 years ago
Luca Barbato
5a9a9d4a2a
lavc: Add refcounted api to AVPacket
...
Provide a clean way to manipulate packets.
11 years ago
Diego Biurrun
7950e519bb
Disable deprecation warnings for cases where a replacement is available
11 years ago
Janne Grunau
91d4823f70
avpacket: copy side data type and size in av_dup_packet
12 years ago
Anton Khirnov
1afddbe59e
avpacket: use AVBuffer to allow refcounting the packets.
...
This will allow us to avoid copying the packets in many cases.
This breaks ABI.
12 years ago
Anton Khirnov
90cfc084e3
avpacket: free side data in av_free_packet().
...
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.
12 years ago
Mans Rullgard
cb6632809d
libavcodec: remove av_destruct_packet_nofree()
...
This function was deprecated two major versions ago (2009).
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
cf3a1948e9
avpacket: fix duplicating side data.
...
Use correct side data size instead of just zeroed field.
13 years ago
Diego Biurrun
2ef15b46e4
avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics
13 years ago
Martin Storsjö
442c1320e7
avpacket: Add a function for shrinking already allocated side data
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Kostya Shishkov
c0eee89337
make av_dup_packet() more cautious on allocation failures
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 years ago
Kostya Shishkov
4de339e219
introduce side information for AVPacket
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Reimar Döffinger
a08d918e68
Add a av_grow_packet function, to be used by code that merges
...
palette and video data packets to get rid of PaletteControl.
Originally committed as revision 25776 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Michael Niedermayer
47a81dad92
indent
...
Originally committed as revision 20802 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Niedermayer
a0b468f5db
Make sure av_new_packet() initializes the data and destruct pointers.
...
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
15 years ago
Ramiro Polla
ce1d9c851c
Export av_free_packet().
...
Originally committed as revision 18719 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Reimar Döffinger
80d403fc19
Get rid of av_destruct_packet_nofree and use NULL instead.
...
It is still used in comparisons to keep ABI compatibility.
Originally committed as revision 18431 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Reimar Döffinger
feb993e579
Add av_shrink_packet function for use in av_get_packet that reduces pkt->size
...
and ensures the following padding is correctly initialized to 0.
Originally committed as revision 18378 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Thilo Borgmann
cdd8930e6a
Move av_packet_*() functions from libavformat/ to libavcodec/, where the
...
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
16 years ago