aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nutdec.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | nutdec: stop skipping bytes at EOFAndreas Cadhalpun2015-05-201-3/+18
| | | | | | | | | | | | | | This can unnecessarily waste a lot of time. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | nutdec: fix infinite resync loopsAndreas Cadhalpun2015-05-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nut->last_syncpoint_pos doesn't necessarily change between resync attempts, so find_any_startcode can return the same startcode again. Thus remember where the last resync happened and don't try to resync before that. This can't be done locally in nut_read_packet, because this wouldn't prevent infinite resync loops, where after the resync a packet is returned and while reading a following packet the resync happens again. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/nutdec: Fix recovery when immedeately after seeking a failure happensMichael Niedermayer2015-05-201-0/+1
| | | | | | | | | | Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: Return error on EOF from get_str()Michael Niedermayer2015-05-201-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: Remove unused variableMichael Niedermayer2015-05-141-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | nutdec: Remove unused labelTimothy Gu2015-05-141-4/+2
| | | | | | | | | | | | | | | | Added in 361702660d2c37a63b7d6381d39e1e1de8405260. Modified version that doesn't use this label merged in 55231323b0fdc84a529418d673148cf1f3157229, thus obsoleting this label. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: Fix use of uinitialized valueMichael Niedermayer2015-05-121-0/+2
| | | | | | | | | | | | Fixes CID1041175 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '254f3daba4271c1918d9a7ad155b1442ef93ed29'Michael Niedermayer2015-05-101-21/+20
|\| | | | | | | | | | | | | | | | | | | | | * commit '254f3daba4271c1918d9a7ad155b1442ef93ed29': nut: Make sure to clean up on read_header failure Conflicts: libavformat/nutdec.c See: 361702660d2c37a63b7d6381d39e1e1de8405260 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nut: Make sure to clean up on read_header failureLuca Barbato2015-05-091-17/+22
| | | | | | | | | | | | Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work. CC: libav-stable@libav.org
* | Merge commit 'b34257eefd98cb768ea2f53a390b8684d51e689a'Michael Niedermayer2015-05-101-1/+1
|\| | | | | | | | | | | | | | | | | | | | | * commit 'b34257eefd98cb768ea2f53a390b8684d51e689a': nut: Check chapter creation in decode_info_header Conflicts: libavformat/nutdec.c See: 3ff1af2b0db7132d5717be6395227a94c8abab07 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nut: Check chapter creation in decode_info_headerAndreas Cadhalpun2015-05-081-0/+4
| | | | | | | | | | | | | | | | This fixes a segmentation fault when accessing the metadata. Signed-off-by: Luca Barbato <lu_zero@gentoo.org> CC: libav-stable@libav.org
| * nutdec: Prevent leaks on memory errorVittorio Giovara2015-03-121-2/+4
| | | | | | | | Bug-Id: CID 205122 / CID 205123
| * nutdec: Check memory allocationsHugo Beauzée-Luyssen2015-02-171-0/+8
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | nutdec: fix illegal count check in decode_main_headerAndreas Cadhalpun2015-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The existing check has two problems: 1) i + count can overflow, so that the check '< 256' returns true. 2) In the (i == 'N') case occurs a j-- so that the loop runs once more. This can trigger the assertion 'nut->header_len[0] == 0' or cause segmentation faults or infinite hangs. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | nutdec: fix memleaks on error in nut_read_headerAndreas Cadhalpun2015-04-281-5/+13
| | | | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | nutdec: check chapter creation in decode_info_headerAndreas Cadhalpun2015-04-281-0/+4
| | | | | | | | | | | | This fixes a segmentation fault when accessing the metadata. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | nutdec: check for negative frame rate in decode_info_headerAndreas Cadhalpun2015-04-281-1/+2
| | | | | | | | | | | | | | A negative frame rate triggers an av_assert2 in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: Use av_malloc_array()Michael Niedermayer2015-03-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9deaec782810d098bca11c9332fab2d2f4c5fb78'Michael Niedermayer2015-02-111-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '9deaec782810d098bca11c9332fab2d2f4c5fb78': lavf: move internal fields from public to internal context Conflicts: libavformat/avformat.h libavformat/internal.h libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: move internal fields from public to internal contextwm42015-02-101-1/+1
| | | | | | | | | | | | | | This is not an API change; the fields were explicitly declared private before. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * nutdec: do not set has_b_framesAnton Khirnov2014-11-061-1/+0
| | | | | | | | It is not supposed to be set by demuxers.
* | Merge commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe'Michael Niedermayer2014-10-221-4/+4
|\| | | | | | | | | | | | | | | | | | | | | * commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe': nutdec: check av_new_packet return value Conflicts: libavformat/nutdec.c See: bb502411ddb9fe1928d4a999693a3a49b83f8698 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nutdec: check av_new_packet return valueVittorio Giovara2014-10-211-2/+4
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 733713
* | Merge commit '96bfb677478514db73d1b63b4213c97ad4269e8f'Michael Niedermayer2014-10-201-1/+1
|\| | | | | | | | | | | | | | | | | | | | | * commit '96bfb677478514db73d1b63b4213c97ad4269e8f': nutdec: Prevent a memory corruption Conflicts: libavformat/nutdec.c See: 05dd5368a92718f3a25f97f4697acffbabc7458f Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nutdec: Prevent a memory corruptionLuca Barbato2014-10-201-2/+3
| | | | | | | | | | | | Chapters do not have an event_flags field. Bug-Id: CID 1231990
* | avformat/nutdec: always initialize event_flagsMichael Niedermayer2014-08-201-2/+3
| | | | | | | | | | | | Fixes: CID1231990 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa'Michael Niedermayer2014-08-131-2/+11
|\| | | | | | | | | | | | | * commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa': nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED ↵Andrew Stone2014-08-131-2/+11
| | | | | | | | | | | | whenever metadata changes. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | replace calls to url_feof() with avio_feof()James Almer2014-08-081-2/+2
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '52a1c32c0a86e84d43f977c5148e62975a0c6917'Michael Niedermayer2014-07-081-5/+5
|\| | | | | | | | | | | | | | | | | | | | | * commit '52a1c32c0a86e84d43f977c5148e62975a0c6917': nut: Use nut->version in the version range check Conflicts: libavformat/nutdec.c Note, this bug did not affect ffmpeg Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nut: Use nut->version in the version range checkLuca Barbato2014-07-081-3/+4
| | | | | | | | | | It was wrongly left unchanged when the version field had been introduced. (c94e2e85cb6af8a570d8542a830556243bd32873)
* | avformat/nutdec: if all else fails try to lookup video tag in isomMichael Niedermayer2014-07-081-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: improve probe speed by 30%Michael Niedermayer2014-06-241-4/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: Fix handling of older 4.0 filesMichael Niedermayer2014-05-291-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c94e2e85cb6af8a570d8542a830556243bd32873'Michael Niedermayer2014-05-291-4/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c94e2e85cb6af8a570d8542a830556243bd32873': nut: Support experimental NUT 4 features Conflicts: doc/nut.texi libavformat/nut.h libavformat/nutdec.c libavformat/nutenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nut: Support experimental NUT 4 featuresLuca Barbato2014-05-281-5/+24
| | | | | | | | | | | | | | Add the low overhead pipe mode and the extended broadcast mode. Export the options as 'syncponts' since it impacts only that. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * nut: Fix unchecked allocationsDerek Buitenhuis2013-10-221-1/+4
| | | | | | | | | | CC: libav-stable@libav.org Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avformat/nut: add ff_nut_audio_extra_tags to demuxer tooMichael Niedermayer2014-04-091-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: fix packet end clearingMichael Niedermayer2014-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | The code was buggy, using the wrong variable, also it missed the case where the packet become smaller due to sidedata/metadata being extracted which left a few bytes uninitialized Fixes use of uninitialized memory Fixed: msan_uninit-mem_7f6abbe44530_6838_mewmew_vorbis_ssa.nut Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: check avio_read() return codeMichael Niedermayer2014-01-071-1/+7
| | | | | | | | | | | | | | Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f2785ab8669_6838_mewmew_vorbis_ssa.nut Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: remove unused variableMichael Niedermayer2014-01-051-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nut: add support for per frame side & meta data with version 4Michael Niedermayer2014-01-041-1/+124
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nutdec: use ff_get_extradata()Michael Niedermayer2013-12-251-2/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nut: add minor_version field with version>=4Michael Niedermayer2013-12-251-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nut: store version in the contextMichael Niedermayer2013-12-251-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | nut: Fix unchecked allocationsDerek Buitenhuis2013-10-221-1/+4
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-3/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/nutdec: check for allocation failuresPaul B Mahol2013-09-111-3/+13
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | nutdec: use ff_find_last_ts()Michael Niedermayer2013-07-061-8/+2
| | | | | | | | | | | | Fixes finding the duration for nut files that are truncated Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe'Michael Niedermayer2013-05-081-10/+16
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe': nut: use meaningful error values FATE: use a less ambiguous end time for filter-trim-time test Conflicts: libavformat/nutdec.c tests/fate/filter-video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>