summaryrefslogtreecommitdiff
path: root/libavcodec/avpacket.c
Commit message (Collapse)AuthorAge
* avpacket: fix size check in packet_allocAndreas Cadhalpun2016-01-05
| | | | | | | | | | | 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' Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* Merge commit '68e547ae8b455e5e2b60839f35c359d77a6d94bc'Hendrik Leppkes2015-12-17
|\ | | | | | | | | | | | | * commit '68e547ae8b455e5e2b60839f35c359d77a6d94bc': avpacket: use ERANGE instead of EOVERFLOW Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpacket: use ERANGE instead of EOVERFLOWAnton Khirnov2015-12-07
| | | | | | | | EOVERFLOW seems to be unavailable on certain platforms.
* | Merge commit '31c51f7441de07b88cfea2550245bf1f5140cb8f'Hendrik Leppkes2015-12-17
|\| | | | | | | | | | | | | * commit '31c51f7441de07b88cfea2550245bf1f5140cb8f': avpacket: add a function for wrapping existing data as side data Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpacket: add a function for wrapping existing data as side dataAnton Khirnov2015-12-06
| |
* | Merge commit 'a9a60106370f862e191dea58e748626da6a8fe97'Hendrik Leppkes2015-10-29
|\| | | | | | | | | | | | | * commit 'a9a60106370f862e191dea58e748626da6a8fe97': avpacket: Provide an alloc and a free function for the struct Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * 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.
* | Merge commit '9b56d5c11488656254e9aed8d964ef2b7c2ff5e6'Hendrik Leppkes2015-10-29
|\| | | | | | | | | | | | | * commit '9b56d5c11488656254e9aed8d964ef2b7c2ff5e6': avpacket: Deprecate av_dup_packet Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * 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.
* | Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-27
| |
* | Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes2015-10-27
|\| | | | | | | | | | | | | * commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * 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`.
* | Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'Hendrik Leppkes2015-09-29
|\| | | | | | | | | | | | | * commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d': lavc: Make AVPacket.duration int64, and deprecate convergence_duration Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * 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>
* | Remove left-over FF_API_DESTRUCT_PACKET cruftHendrik Leppkes2015-09-05
| |
* | Merge commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8'Hendrik Leppkes2015-09-05
|\| | | | | | | | | | | | | * commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8': lavc: Drop deprecated destruct_packet related functions Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: Drop deprecated destruct_packet related functionsVittorio Giovara2015-08-28
| | | | | | | | Deprecated in 10/2012.
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Replace AV_PKT_DATA_QUALITY_FACTOR by AV_PKT_DATA_QUALITY_STATSMichael Niedermayer2015-07-22
| | | | | | | | | | | | | | | | | | The stats are a superset of the quality factor, also allowing the picture type and encoder "PSNR" stats to be exported This also replaces the native by fixed little endian order for the affected side data AV_PKT_DATA_QUALITY_FACTOR is left as a synonym of AV_PKT_DATA_QUALITY_STATS Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: Add av_packet_side_data_name()Michael Niedermayer2015-05-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc'Michael Niedermayer2015-02-17
|\| | | | | | | | | | | | | | | | | | | * commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc': avpacket: Check buffer reference Conflicts: libavcodec/avpacket.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket: Check buffer referenceVittorio Giovara2015-02-17
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 1267889
* | lavc/avpacket: check for malloc failurewm42014-12-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/avpacket: use av_freep(), do not leave stale pointers in memoryMichael Niedermayer2014-10-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/avpacket: simplify freeing pkt->dataMichael Niedermayer2014-10-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '874390e163427c1fe7682ab27924a7843780dbb3'Michael Niedermayer2014-06-20
|\| | | | | | | | | | | | | | | | | | | * commit '874390e163427c1fe7682ab27924a7843780dbb3': lavc: add a convenience function for rescaling timestamps in a packet Conflicts: libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: add a convenience function for rescaling timestamps in a packetAnton Khirnov2014-06-20
| |
* | Merge commit 'cdf58f0599c39852ee3beafe5f64af7d57d4215b'Michael Niedermayer2014-05-19
|\| | | | | | | | | | | | | * commit 'cdf58f0599c39852ee3beafe5f64af7d57d4215b': avpacket: fix copying side data in av_packet_copy_props() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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
* | avcodec/avpacket: use av_malloc_array()Michael Niedermayer2014-04-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec.h, avpacket.c: use const AVPacket pointers in copy functionsRoman Fietze2014-04-04
| | | | | | | | | | Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: move end zeroing code from av_packet_split_side_data() to ↵Michael Niedermayer2013-11-21
| | | | | | | | | | | | | | | | | | | | | | | | avcodec_decode_subtitle2() This code changes the input packet, which is read only and can in rare circumstances lead to decoder errors. (i run into one of these in the audio decoder, which corrupted the packet during av_find_stream_info() so that actual decoding that single packet failed later) Until a better fix is implemented, this commit limits the problem. A better fix might be to make the subtitle decoders not depend on data[size] = 0 or to copy their input when this is not the case.
* | avcodec/avpacket: fix order of operations in case of too large allocationMichael Niedermayer2013-11-20
| | | | | | | | | | Found-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/avpacket: use size_t, fix potential integer overflowMichael Niedermayer2013-11-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avpacket: add pack/unpack functions for AVDictionaryBen Boeckel2013-11-20
| | | | | | | | | | | | | | | | | | These functions are intended for use with side_data which comes in an AVPacket. Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Reviewed-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/avpacket: correctly set the number of side data elements in ↵Michael Niedermayer2013-11-20
| | | | | | | | | | | | av_copy_packet_side_data() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/avpacket/av_packet_split_side_data: ensure that side data padding is ↵Michael Niedermayer2013-10-19
| | | | | | | | | | | | initialized Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-09-16
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: avpacket: Fix error checking in packet_alloc Conflicts: libavcodec/avpacket.c See: b905a7137a51a9a4f66d75172897d1f38c0b292a Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | avcodec/avpacket: zero memory in av_packet_new_side_data()Michael Niedermayer2013-09-04
| | | | | | | | | | | | This ensures that no uninitialized bytes cause non-deterministic behavior. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avpacket: Fixing side data copy when src == dstVignesh Venkatasubramanian2013-09-02
| | | | | | | | | | | | | | | | | | | | Fixing av_packet_copy_side_data to work correctly when source and destination are the same. This makes sure that there is no memory leak and double frees. Signed-off by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/avpacket: Use av_free_packet() in error cleanupsMichael Niedermayer2013-08-30
| | | | | | | | | | | | | | This prevents memleaks on errors reproduceable with fate when error pathes are forced Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: Remove ff_packet_free_side_data, use av_packet_free_side_dataMichael Niedermayer2013-08-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/avpacket: Fix memory allocation failure checkMichael Niedermayer2013-08-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5a9a9d4a2abefa63d9a898ce26715453c569e89d'Michael Niedermayer2013-08-11
|\| | | | | | | | | | | | | | | | | | | | | * commit '5a9a9d4a2abefa63d9a898ce26715453c569e89d': lavc: Add refcounted api to AVPacket Conflicts: libavcodec/avpacket.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Add refcounted api to AVPacketLuca Barbato2013-08-10
| | | | | | | | Provide a clean way to manipulate packets.
* | Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'Michael Niedermayer2013-08-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7950e519bb094897f957b9a9531cc60ba46cbc91': Disable deprecation warnings for cases where a replacement is available Conflicts: libavcodec/avpacket.c libavcodec/pthread.c libavcodec/utils.c libavdevice/v4l2.c libavfilter/avfiltergraph.c libavfilter/buffersrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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
| |