summaryrefslogtreecommitdiff
path: root/libavcodec/avpacket.c
Commit message (Collapse)AuthorAge
* 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
| |
* | lavc/avpacket: fill padding area on side data split.Clément Bœsch2013-06-01
| | | | | | | | | | | | | | | | | | | | | | The padding data is assumed to be 0 in several places, notably in subtitles. This problem was not detected with fate-sub-srt test because the first element of the side data (x1) is 0 in the test, so the trailing side data present in the packet wasn't read by the decoder. The issue can be observed with a large enough x1. It is also noted in FF_INPUT_BUFFER_PADDING_SIZE doxy that MPEG bitstreams require that padding with 0, so it might fix other issues.
* | avcodec/avpacket: Refactoring copy_side_data into a separate functionVignesh Venkatasubramanian2013-05-14
| | | | | | | | | | | | | | | | Refactoring copy_side_data into a separate function so that it can be called in cases where side data needs to be duplicated. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | copy_packet_data: fix memleakMichael Niedermayer2013-04-29
| | | | | | | | | | | | This should fix gif fate memleaks Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avpacket: do not copy data when buf ref is available.Clément Bœsch2013-03-13
| | | | | | | | | | This at least fixes issues with lavf/subtitles. The behaviour of av_dup_packet() is unchanged, only av_copy_packet() is affected.
* | Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'Michael Niedermayer2013-03-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1afddbe59e96af75f1c07605afc95615569f388f': avpacket: use AVBuffer to allow refcounting the packets. Conflicts: libavcodec/avpacket.c libavcodec/utils.c libavdevice/v4l2.c libavformat/avidec.c libavformat/flacdec.c libavformat/id3v2.c libavformat/matroskaenc.c libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Merge commit '90cfc084e3e6d37ab88fc96a95f0401d8e8b4cd1'Michael Niedermayer2013-01-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '90cfc084e3e6d37ab88fc96a95f0401d8e8b4cd1': avpacket: free side data in av_free_packet(). v4l2: do not assert on a value received from outside of Libav v4l2: set the average framerate instead of codec timebase. Conflicts: libavcodec/avpacket.c libavdevice/v4l2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Add av_copy_packet()Andrey Utkin2012-09-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Move av_dup_packet() copy logic to separate procedureAndrey Utkin2012-09-21
| | | | | | | | | | | | Done to simplify next commit introducing av_copy_packet() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | When copying pkt side_data, don't forget size, typeAndrey Utkin2012-09-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '3f7fd59d151a2773f0e2e93e56b6b13ec6e5334b'Michael Niedermayer2012-09-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3f7fd59d151a2773f0e2e93e56b6b13ec6e5334b': avformat: fix typo in avformat_close_input mp3enc: write Xing TOC mp3enc: support MPEG-2 and MPEG-2.5 in Xing header. mp3enc: downgrade some errors in writing Xing frame to warnings lavf: flush the output AVIOContext in av_write_trailer(). lavf: cosmetics, reformat av_write_trailer(). avio: flush the internal buffer in avio_close() Enhance doc on asyncts audiofilter cmdutils: avoid setting data pointers to invalid values in alloc_buffer() libavcodec: remove av_destruct_packet_nofree() Conflicts: libavcodec/avpacket.c libavformat/mp3enc.c libavformat/nutenc.c libavformat/utils.c libavformat/version.h tests/ref/lavf/voc tests/ref/lavf/voc_s16 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Fix even more missing includes after the common.h removal build: Factor out rangecoder dependencies to CONFIG_RANGECODER build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE x86: avcodec: Consistently name all init files Add more missing includes after removing the implicit common.h Add some more missing includes after removing the implicit common.h Don't include common.h from avutil.h rtmp: Automatically compute the hash for SWFVerification Conflicts: configure doc/APIchanges doc/examples/decoding_encoding.c libavcodec/Makefile libavcodec/assdec.c libavcodec/audio_frame_queue.c libavcodec/avpacket.c libavcodec/dv_profile.c libavcodec/dwt.c libavcodec/libtheoraenc.c libavcodec/rawdec.c libavcodec/rv40dsp.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/v210dec.h libavcodec/vc1dsp.c libavcodec/x86/Makefile libavfilter/asrc_anullsrc.c libavfilter/avfilter.c libavfilter/buffer.c libavfilter/formats.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_select.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/version.h libavutil/audioconvert.c libavutil/error.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Don't include common.h from avutil.hMartin Storsjö2012-08-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: librtmp: return AVERROR_UNKNOWN instead of -1. librtmp: don't abuse a variable for two unrelated things. librtmp: add rtmp_app and rtmp_playpath private options. bmv: add stricter checks for invalid decoded length avpacket: fix duplicating side data. flv: support stream text data as onTextData Conflicts: libavcodec/bmv.c libavformat/flvdec.c libavformat/flvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket: fix duplicating side data.Anton Khirnov2012-06-03
| | | | | | | | Use correct side data size instead of just zeroed field.
* | libavcodec: fix side data split with 0 sized packetsMichael Niedermayer2012-05-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libxvid: remove disabled code qdm2: make a table static const qdm2: simplify bitstream reader setup for some subpacket types qdm2: use get_bits_left() build: Consistently handle conditional compilation for all optimization OBJS. avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmetics msrle: convert MS RLE decoding function to bytestream2. x86inc improvements for 64-bit Conflicts: common.mak libavcodec/avpacket.c libavcodec/bfi.c libavcodec/msrledec.c libavcodec/qdm2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket, bfi, bgmc, rawenc: K&R prettyprinting cosmeticsDiego Biurrun2012-04-12
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: error out on invalid bitdepth. aacsbr: use a swap index for the Y matrix rather than copy buffers. huffyuv: do not abort on unknown pix_fmt; instead, return an error. lcl: return negative error codes on decode_init() errors. rtpenc: Use MB info side data for splitting H263 packets for RFC 2190 h263enc: Add an option for outputting info about MBs as side data avpacket: Add a function for shrinking already allocated side data nellymoserdec: Saner and faster IMDCT windowing Conflicts: doc/APIchanges libavcodec/avpacket.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>