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-07-19avcodec/h264_refs: Also check reference in ff_h264_build_ref_list()Michael Niedermayer
Fixes: out of array read Fixes: 15409/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5758846959616000 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-03avcodec/h264_refs: Document last if() in ff_h264_execute_ref_pic_marking()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-03avcodec/h264_refs: Detect more random access points which are not markedMichael Niedermayer
Fixes: nature_360-7501616eb5eafca5-1111.mp4 Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-31Merge commit 'cb167f2947f1a2c446bd8db196d0e64ef4a6d06b'James Almer
* commit 'cb167f2947f1a2c446bd8db196d0e64ef4a6d06b': h264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking() Merged-by: James Almer <jamrial@gmail.com>
2017-05-10h264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking()Sean McGovern
Bug-Id: 1036 CC: libav-stable@libav.org
2017-03-19Merge commit 'b96f0ab3d29cdd9ea9ddabfb2052f72bf8615661'Clément Bœsch
* commit 'b96f0ab3d29cdd9ea9ddabfb2052f72bf8615661': h264: Kill broken disabled cruft Merged-by: Clément Bœsch <u@pkh.me>
2017-03-07avcodec/h264, videotoolbox: fix crash after VT decoder failsAman Gupta
The way videotoolbox hooks in as a hwaccel is pretty hacky. The VT decode API is not invoked until end_frame(), so alloc_frame() returns a dummy frame with a 1-byte buffer. When end_frame() is eventually called, the dummy buffer is replaced with the actual decoded data from VTDecompressionSessionDecodeFrame(). When the VT decoder fails, the frame returned to the h264 decoder from alloc_frame() remains invalid and should not be used. Before 9747219958060d8c4f697df62e7f172c2a77e6c7, it was accidentally being returned all the way up to the API user. After that commit, the dummy frame was unref'd so the user received an error. However, since that commit, VT hwaccel failures started causing random segfaults in the h264 decoder. This happened more often on iOS where the VT implementation is more likely to throw errors on bitstream anomolies. A recent report of this issue can be see in http://ffmpeg.org/pipermail/libav-user/2016-November/009831.html The issue here is that the dummy frame is still referenced internally by the h264 decoder, as part of the reflist and cur_pic_ptr. Deallocating the frame causes assertions like this one to trip later on during decoding: Assertion h->cur_pic_ptr->f->buf[0] failed at src/libavcodec/h264_slice.c:1340 With this commit, we leave the dummy 1-byte frame intact, but avoid returning it to the user. This reverts commit 9747219958060d8c4f697df62e7f172c2a77e6c7. Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-01-31golomb: Convert to the new bitstream readerDiego Biurrun
2016-09-12avcodec/h264_refs: Change default case to av_assert0() to suppress warningMichael Niedermayer
Should fix "libavcodec/h264_refs.c:372:13: warning: variable 'i' is used uninitialized whenever switch default is taken" Found-by: durandal_17 Suggested-by: jkqxz Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-17h264: Kill broken disabled cruftDiego Biurrun
2016-08-04Merge commit 'b13fc1e344011949929975a3451f78f226aa1de3'Timothy Gu
* commit 'b13fc1e344011949929975a3451f78f226aa1de3': h264: do not pass H264Context to h264_slice_header_parse() Conflicts: libavcodec/h264dec.h Did not merge the h264_slice_header_parse() part. We use a few other members of H264Context for error checking in that function. Merged-by: Timothy Gu <timothygu99@gmail.com>
2016-08-01Merge commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c'James Almer
* commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c': h264: add H264_ prefix to the NAL unit types Conflicts: libavcodec/h264_parse.c libavcodec/h264_parser.c libavcodec/h264_slice.c libavcodec/h264dec.c Merged-by: James Almer <jamrial@gmail.com>
2016-07-29Merge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'Clément Bœsch
* commit '251cbb44003caf179fb17afbb8a6c56643c2a646': h264: create a new header for common h264 definitions Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'Clément Bœsch
* commit '9df889a5f116c1ee78c2f239e0ba599c492431aa': h264: rename h264.[ch] to h264dec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
2016-07-27Merge commit 'debca90863e4ee53447efd02483c500f89766384'Clément Bœsch
* commit 'debca90863e4ee53447efd02483c500f89766384': h264: store {curr,max}_pic_num in the per-slice context Merged-by: Clément Bœsch <u@pkh.me>
2016-07-20avcodec/h264: remove list_count and ref_count clearingMichael Niedermayer
The code conflicts with moving the h264_init_ps() call point Without this, ff_h264_parse_ref_count() fills ref and list count and h264_init_ps() subsequently wipes them out on a "success" path. Subsequently things crash as the wiped fields are used. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-10avcodec/h264_refs: Assert that op is 0-2Michael Niedermayer
Coverity fails to realize this Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-09Merge commit '84b2d3fb68caf71cff4b80b44ff865d7ae2531ce'Clément Bœsch
* commit '84b2d3fb68caf71cff4b80b44ff865d7ae2531ce': h264: Drop unused function check_opcodes() Merged-by: Clément Bœsch <u@pkh.me>
2016-06-30Merge commit 'bec993381cfec72051b0d9f12ac9d9bb9c750983'Clément Bœsch
* commit 'bec993381cfec72051b0d9f12ac9d9bb9c750983': h264: postpone generating the implicit MMCOs Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-30Merge commit '2d410ebbaa1e760d6837cb434a6d1d4c3c6f0d85'Clément Bœsch
* commit '2d410ebbaa1e760d6837cb434a6d1d4c3c6f0d85': h264: decode the MMCOs into per-slice contexts Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29Merge commit '39ab2ea53121b9976a619cd545fbd3464b908696'Clément Bœsch
* commit '39ab2ea53121b9976a619cd545fbd3464b908696': h264: rename mmco_index to nb_mmco Merged-by: Clément Bœsch <u@pkh.me>
2016-06-29Merge commit 'ed9a20ebe4a89de119ea97bdccf688ece8c6648c' into merge-libav-newClément Bœsch
* commit 'ed9a20ebe4a89de119ea97bdccf688ece8c6648c': h264: split reading the ref list modifications and actually building the ref list ref_modifications.val are read as u32 instead of u8 in FFmpeg. Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29Merge commit '7b50d60442af8d9527e9da46818011fe15a5265a'Clément Bœsch
* commit '7b50d60442af8d9527e9da46818011fe15a5265a': h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29Merge commit 'b16e9b9ac9db449cae2242767dd3c3fc309357c4'Clément Bœsch
* commit 'b16e9b9ac9db449cae2242767dd3c3fc309357c4': h264: move initialising the explicit pred weight table for MBAFF Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-21Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21h264: do not pass H264Context to h264_slice_header_parse()Anton Khirnov
This should make it more clear that this function does not need any decoder-global state other than the parameter sets.
2016-06-21h264: add H264_ prefix to the NAL unit typesAnton Khirnov
This will prevent conflicts e.g. in code that deals with both h264 and hevc.
2016-06-21h264: create a new header for common h264 definitionsAnton Khirnov
Move the NAL unit types into it. This will allow to stop including the whole decoder-specific h264dec.h in some code that is unrelated to the decoder and only needs some enum values.
2016-06-21h264: rename h264.[ch] to h264dec.[ch]Anton Khirnov
This is more consistent with the naming of other decoders.
2016-06-21h264: store {curr,max}_pic_num in the per-slice contextAnton Khirnov
While the value of those variables will be constant for the whole frame, they are only used in two functions called from slice header decoding. Moving them to the per-slice context allows us to make the H264Context passed to slice_header_parse() constant.
2016-06-19Merge commit '89ae244e78a8d636fbb8427a2da052b04cf710bd'Clément Bœsch
* commit '89ae244e78a8d636fbb8427a2da052b04cf710bd': h264_refs: remove an unused parameter from ff_h264_fill_mbaff_ref_list() Merged-by: Clément Bœsch <u@pkh.me>
2016-06-19Merge commit '755f79f84cbeb5d749fb120e55e0098a2d7663a0'Clément Bœsch
* commit '755f79f84cbeb5d749fb120e55e0098a2d7663a0': h264_refs: make the H264Context const where possible ff_h264_decode_ref_pic_list_reordering() and h264_initialise_ref_list() do not have a const H264Context * as they modify the default_ref inside that context. Merged-by: Clément Bœsch <u@pkh.me>
2016-06-19Merge commit 'a2fd547839d3ef8f342b6f2c096d0887675d3b1a'Clément Bœsch
* commit 'a2fd547839d3ef8f342b6f2c096d0887675d3b1a': h264_refs: reorder functions to avoid forward declarations Merged-by: Clément Bœsch <u@pkh.me>
2016-06-14h264: Drop unused function check_opcodes()Diego Biurrun
2016-06-12h264: postpone generating the implicit MMCOsAnton Khirnov
Do it right before the MMCOs are applied to the DPB. This will allow moving the frame_start() call out of the slice header parsing, since generating the implicit MMCOs needs to be done after frame_start().
2016-06-12h264: decode the MMCOs into per-slice contextsAnton Khirnov
They are stored in the slice header, so technically they are per-slice (though they must be the same in every slice). This will simplify the following commits.
2016-06-12h264: rename mmco_index to nb_mmcoAnton Khirnov
The variable stores the number of mmco entries, so the current name is misleading.
2016-06-12h264: split reading the ref list modifications and actually building the ref ↵Anton Khirnov
list This will allow postponing the reference list construction (and by consequence some other functions, like frame_start) until the whole slice header has been parsed.
2016-06-12h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref listAnton Khirnov
There is no real reason to call it separately.
2016-06-12h264: move initialising the explicit pred weight table for MBAFFAnton Khirnov
Currently it's done in the code that initialises the ref list for MBAFF, which is not a logical place for it. Move it to the function that parses the pred table from the bitstream, which is analogous to what is done for the implicit weight table as well.
2016-06-12h264: drop an outdated commentAnton Khirnov
2016-06-12Merge commit 'c8dcff0cdb17d0aa03ac729eba12d1a20f1f59c8'Clément Bœsch
* commit 'c8dcff0cdb17d0aa03ac729eba12d1a20f1f59c8': h264: factor out calculating the POC count into a separate file Merged-by: Clément Bœsch <u@pkh.me>
2016-06-12Merge commit '3176217c60ca7828712985092d9102d331ea4f3d'Clément Bœsch
* commit '3176217c60ca7828712985092d9102d331ea4f3d': h264: decouple h264_ps from the h264 decoder Main changes: - a local GetBitContext is created for the various ff_h264_decode_seq_parameter_set() attempts - just like the old code, remove_sps() is adjusted so it doesn't remove the pps. Fixes decode with Ticket #631 http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111108/dae58f17/attachment.mp4 but see next point as well. - ff_h264_update_thread_context() is updated to work even when SPS isn't set as it breaks current skip_frame code. This makes sure we can still decode the sample from ticket #631 without the need for -flags2 +chunks. (Thanks to Michael) - keep {sps,pps}_ref pointers that stay alive even when the active pps/sps get removed from the available lists (patch by michaelni with additionnal frees in ff_h264_free_context() from mateo) - added a check on sps in avpriv_h264_has_num_reorder_frames() to fix crashes with mpegts_with_dvbsubs.ts from Ticket #4074 http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4074/mpegts_with_dvbsubs.ts - in h264_parser.c:h264_parse(), after the ff_h264_decode_extradata() is called, the pps and sps from the local parser context are updated with the pps and sps from the used h264context. This fixes fate-flv-demux. - in h264_slice.c, "PPS changed between slices" error is not triggered anymore in one condition as it makes fate-h264-xavc-4389 fails with THREADS=N (Thanks to Michael) Merged-by: Clément Bœsch <clement@stupeflix.com> Merged-by: Michael Niedermayer <michael@niedermayer.cc> Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-02avcodec/h264_refs: Fix pps_ref_count with multiple PPSMichael Niedermayer
Found-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-02avcodec/h264_refs: Remove unused pps_countMichael Niedermayer
Found-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-04cosmetics: Fix spelling mistakesVittorio Giovara
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-04-26Merge commit 'e481458bc308ee838deaeacac51929514762e7a7'Derek Buitenhuis
* commit 'e481458bc308ee838deaeacac51929514762e7a7': h264: factor out pred weight table parsing into a separate file Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24h264_refs: remove an unused parameter from ff_h264_fill_mbaff_ref_list()Anton Khirnov
2016-04-24h264_refs: make the H264Context const where possibleAnton Khirnov
2016-04-24h264_refs: reorder functions to avoid forward declarationsAnton Khirnov