summaryrefslogtreecommitdiff
path: root/libavformat/nsvdec.c
Commit message (Collapse)AuthorAge
* nsvdec: convert to new channel layout APIVittorio Giovara2022-03-15
| | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Avoid allocation for AVStreamInternalAndreas Rheinhardt2021-09-17
| | | | | | | | | | Do this by allocating AVStream together with the data that is currently in AVStreamInternal; or rather: Put AVStream at the beginning of a new structure called FFStream (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove AVStreamInternal altogether. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/nsvdec: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-08
| | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: move AVStream.{parser,need_parsing} to AVStreamInternalJames Almer2021-05-07
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavf: move AVStream.*index_entries* to AVStreamInternalAnton Khirnov2020-10-28
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Since there are some (semi-)public fields located after these, even though this section is supposed to be private, keep some dummy padding there until the next major bump to preserve ABI compatibility.
* avformat/nsvdec: Use av_packet_move_ref() for packet ownership transferAndreas Rheinhardt2020-03-26
| | | | | | | Also simply return 0 in case a packet has been successfully read. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/nsvdec: Fix memleaks on errors while reading the headerMichael Niedermayer2020-03-19
| | | | | | | | | Fixes: memleaks Fixes: 21084/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5655975492321280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* avformat/nsvdec: Do not parse multiple NSVfMichael Niedermayer2018-08-20
| | | | | | | | | | The specification states "NSV files may contain a single file header. " Fixes: out of array access Fixes: nsv-asan-002f473f726a0dcbd3bd53e422c4fc40b3cf3421 Found-by: Paul Ch <paulcher@icloud.com> Tested-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/nsvdec: Fix DoS due to lack of eof check in nsvs_file_offset loop.孙浩(晓黑)2017-09-01
| | | | | | | | Fixes: 20170829.nsv Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-29
|
* Merge commit 'ca1e5eea0c7b72a6e30aa6488cfeced3a4853521'Clément Bœsch2017-03-24
|\ | | | | | | | | | | | | * commit 'ca1e5eea0c7b72a6e30aa6488cfeced3a4853521': Remove some pointless TRACE level debug code Merged-by: Clément Bœsch <u@pkh.me>
| * Remove some pointless TRACE level debug codeDiego Biurrun2016-10-27
| | | | | | | | This also kills some warnings with certain compiler options.
* | Merge commit 'c3dad1bf3b5e04e01c291b1ac41e6bef0adf2206'Clément Bœsch2017-03-24
|\| | | | | | | | | | | | | * commit 'c3dad1bf3b5e04e01c291b1ac41e6bef0adf2206': nsv: Drop unnecessary TRACE level debug code Merged-by: Clément Bœsch <u@pkh.me>
| * nsv: Drop unnecessary TRACE level debug codeDiego Biurrun2016-10-27
| | | | | | | | The output is rather silly and the code uses non-standard __FUNCTION__.
* | Merge commit 'be3363f664d7314d55b42860bd4077154752d769'Clément Bœsch2017-03-19
|\| | | | | | | | | | | | | * commit 'be3363f664d7314d55b42860bd4077154752d769': nsv: Drop disabled cruft Merged-by: Clément Bœsch <u@pkh.me>
| * nsv: Drop disabled cruftDiego Biurrun2016-08-17
| |
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes2015-10-27
|\| | | | | | | | | | | | | * commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | | | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* | avformat/nsvdec: remove trace log from probe(), this is better done ↵Michael Niedermayer2015-04-21
| | | | | | | | | | | | | | generically not per format Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | | | | | This applies to every library where performance is not critical.
* | avformat/nsvdec: Use av_malloc_array()Michael Niedermayer2015-04-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e': avformat: Don't anonymously typedef structs Conflicts: libavformat/adtsenc.c libavformat/aiffenc.c libavformat/avidec.c libavformat/gif.c libavformat/iff.c libavformat/img2dec.c libavformat/jvdec.c libavformat/matroskadec.c libavformat/udp.c libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
| |
* | avformat/nsvdec: remove case which is no longer possiblePaul B Mahol2015-01-28
| | | | | | | | | | | | Check of channels !=0 is right above. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '7c51d79ca7badfb370c410b8f44c9142b938e2e6'Michael Niedermayer2015-01-27
|\| | | | | | | | | | | | | | | * commit '7c51d79ca7badfb370c410b8f44c9142b938e2e6': nsvdec: validate channels and samplerate See: d633e15d7d939f532326e2bc92097b12eba4d5ae Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nsvdec: validate channels and samplerateVittorio Giovara2015-01-27
| | | | | | | | | | | | | | Avoid a division by zero. CC: libav-stable@libav.org Bug-Id: CID 717749
* | avformat/nsvdec: Check the return value of av_get_packet()Michael Niedermayer2015-01-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nsvdec: Check av_get_packet() return valueMichael Niedermayer2015-01-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/nsvdec: fix out-commented asserts so the function names existMichael Niedermayer2014-08-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | replace calls to url_feof() with avio_feof()James Almer2014-08-08
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '27c1f82f561932c83191bcd3e70e0cb1712485ba'Michael Niedermayer2014-07-09
|\| | | | | | | | | | | | | * commit '27c1f82f561932c83191bcd3e70e0cb1712485ba': nsvdec: remove commented out cruft Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nsvdec: remove commented out cruftAnton Khirnov2014-07-09
| |
* | Merge commit 'c011ceef78eae66039efc66d9551a7146e08838a'Michael Niedermayer2013-06-03
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'c011ceef78eae66039efc66d9551a7146e08838a': swscale: ppc: Remove commented-out define cruft nsvdec: Remove commented-out debug cruft cpu: Restructure code to avoid pointless ret variable indirection Conflicts: libavutil/cpu.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * nsvdec: Remove commented-out debug cruftDiego Biurrun2013-06-02
| |
* | Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'Michael Niedermayer2013-05-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e0f8be6413b6a8d334d6052e610af32935c310af': avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate Conflicts: libavformat/ac3dec.c libavformat/avformat.h libavformat/avs.c libavformat/m4vdec.c libavformat/mov.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegvideodec.c libavformat/psxstr.c libavformat/pva.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriateDiego Biurrun2013-05-04
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-04-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Move misplaced file author information where it belongs Conflicts: libavcodec/adpcm.c libavcodec/adpcmenc.c libavcodec/gif.c libavcodec/x86/dsputilenc_mmx.c libavcodec/x86/fmtconvert_init.c libavformat/au.c libavformat/gif.c libavformat/mov.c libavformat/nsvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Move misplaced file author information where it belongsDiego Biurrun2013-04-11
| |
* | Merge commit '523c7bd23c781aa0f3a85044896f5e18e8b52534'Michael Niedermayer2012-12-19
|\| | | | | | | | | | | | | | | | | | | | | * commit '523c7bd23c781aa0f3a85044896f5e18e8b52534': misc typo, style and wording fixes Conflicts: libavcodec/options_table.h libavutil/pixfmt.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * misc typo, style and wording fixesDiego Biurrun2012-12-18
| |
* | Merge commit 'bfe5454cd238b16e7977085f880205229103eccb'Michael Niedermayer2012-11-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'bfe5454cd238b16e7977085f880205229103eccb': lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h lavf: move "MP3 " fourcc from riff to nut fate: vpx: Add dependencies fate: Fix wavpack-matroskamode test dependencies x86: dsputilenc: port to cpuflags Conflicts: libavformat/internal.h libavformat/nut.c tests/fate/vpx.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>