Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-05-12lavc/avpacket: check NULL before using the pointerJun Zhao
Need to check NULL before using the pointer Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-03-02avcodec/avpacket: add some assertions to ensure pkt->data is not null if ↵Marton Balint
pkt->size > 0 This should fix the following Coverity false positives: Coverity CID #1405450. Coverity CID #1430930. Signed-off-by: Marton Balint <cus@passwd.hu>
2019-01-01avcodec/avpacket: Avoid unspecific return -1 for av_grow_packet()Michael Niedermayer
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-12avcodec/avpacket: fix whitespaceAman Gupta
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-09-21lavc/avpacket: Add missing conversions from side data enum to name.Jun Zhao
Add missing conversions from side data enum to name. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-02avcodec/avpacket: add av_packet_make_refcounted()James Almer
It works as a drop in replacement for the deprecated av_dup_packet(), to ensure a packet is reference counted. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-27avcodec/avpacket: remove unnecessary check in av_packet_make_writable()James Almer
Zero sized packets are already handled below in the function. This is more in line with av_packet_ref(). Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-22avcodec/avpacket: add av_packet_make_writable()James Almer
Useful as well to quickly make a packet reference counted when it isn't already so. Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-15avpacket: reset dst side_data fields in av_packet_copy_propsYusuke Nakamura
This effectively copies the side data elements from src instead of potentially merging them with those already existing in dst. This by extension also removes the only dependency on existing values in the dst packet. Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-22avcodec: remove ABI portion of the side data merging APIJames Almer
The actual API is left in place until the deprecation period ends. Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-28avdevice/decklink_dec: Added Closed caption decode from VANCKarthick J
Signed-off-by: Karthick J <kjeyapal@akamai.com> Signed-off-by: Marton Balint <cus@passwd.hu>
2017-09-26avcodec/avpacket: deprecate av_copy_packet()James Almer
It does the same thing as av_packet_ref(). Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-11avcodec/avpacket: Limit iterations in ff_packet_split_and_drop_side_data()Michael Niedermayer
This avoids scaning beyond what a valid packet can contain Fixes: Timeout Fixes: 541/clusterfuzz-testcase-610189291657625 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-13avcodec/avpacket: allow only one element per type in packet side dataJames Almer
It was never meant to do otherwise, as av_packet_get_side_data() returns the first entry it finds of a given type. Based on code from libavformat's av_stream_add_side_data(). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2017-05-12avcodec/avcodec: Limit the number of side data elements per packetMichael Niedermayer
Fixes: 1293/clusterfuzz-testcase-minimized-6054752074858496 See: [FFmpeg-devel] [PATCH] avcodec/avcodec: Limit the number of side data elements per packet Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-06avcodec: Avoid splitting side data repeatedlyMichael Niedermayer
Fixes Timeout Fixes: 508/clusterfuzz-testcase-6245747678773248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-06lavc: Add Content Light Level side metadata found in HEVCSteve Lhomme
These data are necessary when transmitting HDR over HDMI. Signed-off-by: James Almer <jamrial@gmail.com>
2017-04-01Merge commit 'adb0e941c329a4778ade6dd0a326274472992f54'Clément Bœsch
* commit 'adb0e941c329a4778ade6dd0a326274472992f54': avpacket: Mark src pointer as constant See 5bb3f8825584a319b25b430e4ece2fa5b2b47ff9 Merged-by: Clément Bœsch <u@pkh.me>
2017-03-21avcodec, avformat: deprecate anything related to side data mergingwm4
This patch deprecates anything that has to do with merging/splitting side data. Automatic side data merging (and splitting), as well as all API symbols involved in it, are removed completely. Two FF_API_ defines are dedicated to deprecating API symbols related to this: FF_API_MERGE_SD_API removes av_packet_split/merge_side_data in libavcodec, and FF_API_LAVF_KEEPSIDE_FLAG deprecates AVFMT_FLAG_KEEP_SIDE_DATA in libavformat. Since it was claimed that changing the default from merging side data to not doing it is an ABI change, there are two additional FF_API_ defines, which stop using the side data merging/splitting by default (and remove any code in avformat/avcodec doing this): FF_API_MERGE_SD in libavcodec, and FF_API_LAVF_MERGE_SD in libavformat. It is very much intended that FF_API_MERGE_SD and FF_API_LAVF_MERGE_SD are quickly defined to 0 in the next ABI bump, while the API symbols are retained for a longer time for the sake of compatibility. AVFMT_FLAG_KEEP_SIDE_DATA will (very much intentionally) do nothing for most of the time it will still be defined. Keep in mind that no code exists that actually tries to unset this flag for any reason, nor does such code need to exist. Code setting this flag explicitly will work as before. Thus it's ok for AVFMT_FLAG_KEEP_SIDE_DATA to do nothing once side data merging has been removed from libavformat. In order to avoid that anyone in the future does this incorrectly, here is a small guide how to update the internal code on bumps: - next ABI bump (probably soon): - define FF_API_LAVF_MERGE_SD to 0, and remove all code covered by it - define FF_API_MERGE_SD to 0, and remove all code covered by it - next API bump (typically two years in the future or so): - define FF_API_LAVF_KEEPSIDE_FLAG to 0, and remove all code covered by it - define FF_API_MERGE_SD_API to 0, and remove all code covered by it This forces anyone who actually wants packet side data to temporarily use deprecated API to get it all. If you ask me, this is batshit fucked up crazy, but it's how we roll. Making AVFMT_FLAG_KEEP_SIDE_DATA to be set by default was rejected as an ABI change, so I'm going all the way to get rid of this once and for all. Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-16lavc/avpacket: Make pkt parameter of av_packet_get_side_data() const.Carl Eugen Hoyos
Reflects the actual code and silences a gcc warning: libavcodec/utils.c:2102:36: warning: passing argument 1 of 'av_packet_get_side_data' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2017-03-01avcodec/avpacket: Check metadata key in av_packet_unpack_dictionary()Michael Niedermayer
Fixes timeout Fixes: 501/clusterfuzz-testcase-5672752870588416 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-17lavc/avpacket: Initialize a variable in error path.Carl Eugen Hoyos
Fixes ticket #6153. Tested-by: Tyson Smith
2016-12-07lavc: Add spherical packet side data APIVittorio Giovara
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-20avcodec/avpacket: fix leak on realloc in av_packet_add_side_data()James Almer
If realloc fails, the pointer is overwritten and the previously allocated buffer is leaked, which goes against the expected behavior of keeping the packet unchanged in case of error. Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-17avpacket: Mark src pointer as constantLuca Barbato
2016-09-22lavc/avpacket: Fix undefined behaviour, do not pass a null pointer to memcpy().Carl Eugen Hoyos
Fixes ticket #5857.
2016-09-13avcodec/avpacket: clear side_data_elemsMichael Niedermayer
Fixes null pointer dereference Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05lavc/avpacket: Fix undefined behaviour, do not pass a null pointer to memcpy().Carl Eugen Hoyos
Fixes ticket #5128.
2016-06-22Merge commit '8996515b137f962e3a8691241c285c96437b6c53'Clément Bœsch
* commit '8996515b137f962e3a8691241c285c96437b6c53': avpacket: fix setting AVPacket.data in av_packet_ref() This commit is a noop, see ed3a02547c71ac06fa27f17ad53116a74f78d927 Merged-by: Clément Bœsch <u@pkh.me>
2016-06-13avpacket: Error out when creating 0-sized side dataVittorio Giovara
This mimics the behaviour of other av_*_new_side_data(). This is not caught by the malloc check, since padding is always added to the allocated size. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-02avcodec/avpacket: Respect payload offset in av_grow_packetAndriy Lysnevych
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-16avpacket: fix setting AVPacket.data in av_packet_ref()Anton Khirnov
The data field does not necessarily point to the beginning of the underlying AVBuffer. CC: libav-stable@libav.org
2016-05-13avcodec/avpacket: Respect payload offset in av_packet_refAndriy Lysnevych
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-21avcodec/avpacket: Fix off by 5 errorMichael Niedermayer
Fixes out of array read Fixes: mozilla bug 1266129 Found-by: Tyson Smith Tested-by: Tyson Smith Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-12Merge commit 'dbb43b8b83b097585ec255ec638b61e359ebea77'Derek Buitenhuis
* commit 'dbb43b8b83b097585ec255ec638b61e359ebea77': avpacket: properly reset data/size in av_packet_move_ref() Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-26avpacket: properly reset data/size in av_packet_move_ref()Anton Khirnov
It currently just calls av_init_packet(), which does not touch those fields.
2016-02-25libavcodec:add packet level support for mastering metadataNeil Birkbeck
Some containers, like webm/mkv, will contain this mastering metadata. This is analogous to the way 3D fpa data is handled (in frame and packet side data). Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-23lavc/lavf: transmit stream_id information for mpegts KLV data packetsStefano Sabatini
This allows to copy information related to the stream ID from the demuxer to the muxer, thus allowing for example to retain information related to synchronous and asynchronous KLV data packets. This information is used in the muxer when remuxing to distinguish the two kind of packets (if the information is lacking, data packets are considered synchronous). The fate reference changes are due to the use of av_packet_merge_side_data(), which increases the size of the output packet size, since side data is merged into the packet data.
2016-01-07avpacket: fix size check in packet_allocAndreas Cadhalpun
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' Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-06avpacket: fix size check in packet_allocAndreas Cadhalpun
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>
2015-12-17Merge commit '68e547ae8b455e5e2b60839f35c359d77a6d94bc'Hendrik Leppkes
* commit '68e547ae8b455e5e2b60839f35c359d77a6d94bc': avpacket: use ERANGE instead of EOVERFLOW Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17Merge commit '31c51f7441de07b88cfea2550245bf1f5140cb8f'Hendrik Leppkes
* commit '31c51f7441de07b88cfea2550245bf1f5140cb8f': avpacket: add a function for wrapping existing data as side data Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-07avpacket: use ERANGE instead of EOVERFLOWAnton Khirnov
EOVERFLOW seems to be unavailable on certain platforms.
2015-12-06avpacket: add a function for wrapping existing data as side dataAnton Khirnov
2015-10-29Merge commit 'a9a60106370f862e191dea58e748626da6a8fe97'Hendrik Leppkes
* commit 'a9a60106370f862e191dea58e748626da6a8fe97': avpacket: Provide an alloc and a free function for the struct Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-29Merge commit '9b56d5c11488656254e9aed8d964ef2b7c2ff5e6'Hendrik Leppkes
* commit '9b56d5c11488656254e9aed8d964ef2b7c2ff5e6': avpacket: Deprecate av_dup_packet Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes
2015-10-27Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-26avpacket: Provide an alloc and a free function for the structLuca Barbato
Pave the way for having the size of the AVPacket struct not part of the ABI.
2015-10-26avpacket: Deprecate av_dup_packetLuca Barbato
As documented, `av_dup_packet` is broken by design, `av_packet_ref` matches the AVFrame ref-counted API and can be safely used instead.