Andrey Utkin
cc07a7925e
Add av_copy_packet()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Andrey Utkin
d33908a5fc
Move av_dup_packet() copy logic to separate procedure
...
Done to simplify next commit introducing av_copy_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Andrey Utkin
b0fabed20f
When copying pkt side_data, don't forget size, type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
3230590c5d
libavcodec: fix side data split with 0 sized packets
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Reimar Döffinger
c4ba5198ea
Fix leaking of side data.
...
While we correctly "register" the side data when we split it,
the application (in this case FFmpeg) might not update the
AVPacket pool it uses to finally free the packet, thus
causing a leak.
This also makes the av_dup_packet unnecessary which could
cause an even worse leak in this situation.
Also change the code to not modify the user-provide AVPacket at all.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Reimar Döffinger
54a09f18e3
Fix av_packet_split_side_data.
...
p cannot be calculated before av_dup_packet since that one
might change avpkt->data, causing invalid reads and a
non-working range check.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Michael Niedermayer
94eadee7ef
Merge/split side data.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 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