summaryrefslogtreecommitdiffstats
path: root/libavcodec/avpacket.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-261-1/+5
| | | | | | | | | | | | | | `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-291-0/+12
|\| | | | | | | | | | | | | * commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d': lavc: Make AVPacket.duration int64, and deprecate convergence_duration Merged-by: Hendrik Leppkes <[email protected]>
| * lavc: Make AVPacket.duration int64, and deprecate convergence_durationwm42015-09-291-0/+12
| | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | Remove left-over FF_API_DESTRUCT_PACKET cruftHendrik Leppkes2015-09-051-12/+1
| |
* | Merge commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8'Hendrik Leppkes2015-09-051-48/+0
|\| | | | | | | | | | | | | * commit '01bcc2d5c23fa757d163530abb396fd02f1be7c8': lavc: Drop deprecated destruct_packet related functions Merged-by: Hendrik Leppkes <[email protected]>
| * lavc: Drop deprecated destruct_packet related functionsVittorio Giovara2015-08-281-55/+1
| | | | | | | | Deprecated in 10/2012.
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-19/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-15/+15
| | | | | | | | Signed-off-by: Vittorio Giovara <[email protected]>
* | Replace AV_PKT_DATA_QUALITY_FACTOR by AV_PKT_DATA_QUALITY_STATSMichael Niedermayer2015-07-221-0/+25
| | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | avcodec: Add av_packet_side_data_name()Michael Niedermayer2015-05-071-0/+23
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc'Michael Niedermayer2015-02-171-1/+3
|\| | | | | | | | | | | | | | | | | | | * commit 'fe0f4e56577a2dbd373bb50b0ae2d49e69d822fc': avpacket: Check buffer reference Conflicts: libavcodec/avpacket.c Merged-by: Michael Niedermayer <[email protected]>
| * avpacket: Check buffer referenceVittorio Giovara2015-02-171-1/+6
| | | | | | | | | | CC: [email protected] Bug-Id: CID 1267889
* | lavc/avpacket: check for malloc failurewm42014-12-121-1/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/avpacket: use av_freep(), do not leave stale pointers in memoryMichael Niedermayer2014-10-071-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/avpacket: simplify freeing pkt->dataMichael Niedermayer2014-10-071-2/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit '874390e163427c1fe7682ab27924a7843780dbb3'Michael Niedermayer2014-06-201-0/+13
|\| | | | | | | | | | | | | | | | | | | * commit '874390e163427c1fe7682ab27924a7843780dbb3': lavc: add a convenience function for rescaling timestamps in a packet Conflicts: libavcodec/version.h Merged-by: Michael Niedermayer <[email protected]>
| * lavc: add a convenience function for rescaling timestamps in a packetAnton Khirnov2014-06-201-0/+13
| |
* | Merge commit 'cdf58f0599c39852ee3beafe5f64af7d57d4215b'Michael Niedermayer2014-05-191-1/+0
|\| | | | | | | | | | | | | * commit 'cdf58f0599c39852ee3beafe5f64af7d57d4215b': avpacket: fix copying side data in av_packet_copy_props() Merged-by: Michael Niedermayer <[email protected]>
| * avpacket: fix copying side data in av_packet_copy_props()Anton Khirnov2014-05-191-1/+0
| | | | | | | | | | | | | | | | 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: [email protected]
* | avcodec/avpacket: use av_malloc_array()Michael Niedermayer2014-04-081-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec.h, avpacket.c: use const AVPacket pointers in copy functionsRoman Fietze2014-04-041-4/+4
| | | | | | | | | | Signed-off-by: Roman Fietze <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec: move end zeroing code from av_packet_split_side_data() to ↵Michael Niedermayer2013-11-211-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-201-1/+3
| | | | | | | | | | Found-by: wm4 Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/avpacket: use size_t, fix potential integer overflowMichael Niedermayer2013-11-201-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avpacket: add pack/unpack functions for AVDictionaryBen Boeckel2013-11-201-0/+58
| | | | | | | | | | | | | | | | | | These functions are intended for use with side_data which comes in an AVPacket. Signed-off-by: Ben Boeckel <[email protected]> Reviewed-by: wm4 Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/avpacket: correctly set the number of side data elements in ↵Michael Niedermayer2013-11-201-0/+1
| | | | | | | | | | | | av_copy_packet_side_data() Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/avpacket/av_packet_split_side_data: ensure that side data padding is ↵Michael Niedermayer2013-10-191-1/+1
| | | | | | | | | | | | initialized Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-09-161-3/+4
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: avpacket: Fix error checking in packet_alloc Conflicts: libavcodec/avpacket.c See: b905a7137a51a9a4f66d75172897d1f38c0b292a Merged-by: Michael Niedermayer <[email protected]>
| * avpacket: Fix error checking in packet_allocMartin Storsjö2013-09-161-3/+4
| | | | | | | | | | | | | | | | | | | | 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: [email protected] Signed-off-by: Martin Storsjö <[email protected]>
* | avcodec/avpacket: zero memory in av_packet_new_side_data()Michael Niedermayer2013-09-041-1/+1
| | | | | | | | | | | | This ensures that no uninitialized bytes cause non-deterministic behavior. Signed-off-by: Michael Niedermayer <[email protected]>
* | avpacket: Fixing side data copy when src == dstVignesh Venkatasubramanian2013-09-021-2/+4
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/avpacket: Use av_free_packet() in error cleanupsMichael Niedermayer2013-08-301-2/+2
| | | | | | | | | | | | | | This prevents memleaks on errors reproduceable with fate when error pathes are forced Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec: Remove ff_packet_free_side_data, use av_packet_free_side_dataMichael Niedermayer2013-08-121-9/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/avpacket: Fix memory allocation failure checkMichael Niedermayer2013-08-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit '5a9a9d4a2abefa63d9a898ce26715453c569e89d'Michael Niedermayer2013-08-111-11/+92
|\| | | | | | | | | | | | | | | | | | | | | * commit '5a9a9d4a2abefa63d9a898ce26715453c569e89d': lavc: Add refcounted api to AVPacket Conflicts: libavcodec/avpacket.c libavcodec/version.h Merged-by: Michael Niedermayer <[email protected]>
| * lavc: Add refcounted api to AVPacketLuca Barbato2013-08-101-12/+92
| | | | | | | | Provide a clean way to manipulate packets.
* | Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'Michael Niedermayer2013-08-031-0/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
| * Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-021-0/+15
| |
| * avpacket: copy side data type and size in av_dup_packetJanne Grunau2013-03-131-1/+4
| |
* | lavc/avpacket: fill padding area on side data split.Clément Bœsch2013-06-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | 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-141-4/+15
| | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | copy_packet_data: fix memleakMichael Niedermayer2013-04-291-5/+6
| | | | | | | | | | | | This should fix gif fate memleaks Signed-off-by: Michael Niedermayer <[email protected]>
* | avpacket: do not copy data when buf ref is available.Clément Bœsch2013-03-131-2/+9
| | | | | | | | | | 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-081-43/+115
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
| * avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-081-27/+94
| | | | | | | | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* | Merge commit '90cfc084e3e6d37ab88fc96a95f0401d8e8b4cd1'Michael Niedermayer2013-01-141-3/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
| * avpacket: free side data in av_free_packet().Anton Khirnov2013-01-131-8/+6
| | | | | | | | | | | | | | | | | | 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-211-0/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | Move av_dup_packet() copy logic to separate procedureAndrey Utkin2012-09-211-23/+29
| | | | | | | | | | | | Done to simplify next commit introducing av_copy_packet() Signed-off-by: Michael Niedermayer <[email protected]>
* | When copying pkt side_data, don't forget size, typeAndrey Utkin2012-09-171-1/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>