Anton Khirnov
31c51f7441
avpacket: add a function for wrapping existing data as side data
9 years ago
Luca Barbato
a9a6010637
avpacket: Provide an alloc and a free function for the struct
...
Pave the way for having the size of the AVPacket struct not part
of the ABI.
9 years ago
Luca Barbato
9b56d5c114
avpacket: Deprecate av_dup_packet
...
As documented, `av_dup_packet` is broken by design, `av_packet_ref`
matches the AVFrame ref-counted API and can be safely used instead.
9 years ago
Luca Barbato
ce70f28a17
avpacket: Replace av_free_packet with av_packet_unref
...
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.
Deprecate `av_free_packet`.
9 years ago
wm4
948f3c19a8
lavc: Make AVPacket.duration int64, and deprecate convergence_duration
...
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>
9 years ago
Vittorio Giovara
01bcc2d5c2
lavc: Drop deprecated destruct_packet related functions
...
Deprecated in 10/2012.
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
fe0f4e5657
avpacket: Check buffer reference
...
CC: libav-stable@libav.org
Bug-Id: CID 1267889
10 years ago
Anton Khirnov
874390e163
lavc: add a convenience function for rescaling timestamps in a packet
11 years ago
Anton Khirnov
cdf58f0599
avpacket: fix copying side data in av_packet_copy_props()
...
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
11 years ago
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