summaryrefslogtreecommitdiff
path: root/libavformat/bink.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/utils: Move ff_get_extradata to demux_utils.cAndreas Rheinhardt2022-05-101-0/+1
| | | | | | | | It is only used by demuxers (although it is hypothetically possible that some day e.g. a protocol might need it, but that is unlikely given that they don't deal with AVCodecParameters). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* bink: convert to new channel layout APIVittorio Giovara2022-03-151-5/+3
| | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Avoid allocation for AVStreamInternalAndreas Rheinhardt2021-09-171-8/+10
| | | | | | | | | | 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: Constify all muxer/demuxersAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | 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-281-5/+5
| | | | | | | 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/bink: properly mark packets that are key framesPaul B Mahol2020-03-201-3/+8
|
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-121-6/+8
| | | | | | | | | | It is not uncommon to find code where the caller thinks to know better what the return value should be than the callee. E.g. something like "if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit changes several instances of this to instead forward the actual error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-211-1/+1
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* avformat/bink: move code for skipping unknown fields to correct placePaul B Mahol2018-07-221-6/+8
|
* lavf/bink: fix latest header and add all existing revisionsbnnm2017-08-201-4/+13
| | | | | | | KB2 'i' found in Life is Strange (Xbox 360), rest verified against binkconv.exe Signed-off-by: bnnm <bananaman255@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-211-1/+1
|\ | | | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-301-1/+1
| | | | | | | | | | | | | | | | It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
* | lavf/bink.c: fix warning due to misleading indentationAdriano Pallavicino2016-10-031-1/+1
| | | | | | | | | | Signed-off-by: Adriano Pallavicino <adriano.pallavicino@gmail.com> Signed-off-by: Josh de Kock <josh@itanimul.li>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\ \ | |/ | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | lavf/bink: Cosmetics: Reindent after last commit.Carl Eugen Hoyos2016-04-151-10/+10
| |
* | lavf/bink: Support Monkey Island 4 (SMUSH) files.Carl Eugen Hoyos2016-04-151-2/+19
| | | | | | | | Fixes ticket #5410.
* | avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol2016-04-141-1/+1
| | | | | | | | | | | | Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-20/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-231-23/+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.
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-2/+2
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | bink: check vst->index_entries before using itAndreas Cadhalpun2015-04-221-1/+4
| | | | | | | | | | | | | | | | | | This fixes a NULL pointer dereference if vst->duration is 0. The problem was introduced in commit 0588acaf. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-141-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-141-1/+1
| |
* | Merge commit 'd92024f18fa3d69937cb2575f3a8bf973df02430'Michael Niedermayer2014-03-111-3/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd92024f18fa3d69937cb2575f3a8bf973df02430': lavf: more correct printf format specifiers Conflicts: libavformat/asfdec.c libavformat/cafdec.c libavformat/dxa.c libavformat/framecrcenc.c libavformat/hnm.c libavformat/iff.c libavformat/mov.c libavformat/mxfdec.c libavformat/rmdec.c libavformat/rpl.c libavformat/smacker.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: more correct printf format specifiersDiego Biurrun2014-03-111-3/+7
| |
* | avformat/bink: Check return value of av_add_index_entry()Michael Niedermayer2014-02-171-2/+4
| | | | | | | | | | | | | | Fixes null pointer dereference Fixes: cdbf15cbd0a27cee958dd0b8800e452e-signal_sigsegv_737991_2083_cov_317652874_LBSTART.BIK Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/bink: display audio track idsPeter Ross2014-01-031-0/+1
| | | | | | | | | | Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/bink: seek to first framePeter Ross2014-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some rare bink files include unused bytes between the frame table index and first frame data. Fixes ticket #3266. This patch has also been tested with non-seekable protocols. Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/bink: recognize bink2 filesPeter Ross2014-01-021-2/+10
| | | | | | | | | | | | | | Support demuxing of audio streams in bink2 files. Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/bink: use ff_get_extradata()Michael Niedermayer2013-12-251-2/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-6/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-02-011-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Use proper "" quotes for local header #includes ppc: fmtconvert: Drop two unused variables. bink demuxer: set framerate. Conflicts: libavcodec/kbdwin.c libavcodec/ppc/fmtconvert_altivec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * bink demuxer: set framerate.Anton Khirnov2013-02-011-0/+1
| |
| * bink demuxer: check malloc return valueAnton Khirnov2013-02-011-0/+2
| |
* | bink: return AVERROR_EOF upon reaching end of filePeter Ross2012-11-211-1/+1
| | | | | | | | | | | | | | | | Fixes ticket #1935. Signed-off-by: Peter Ross <pross@xvid.org> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b'Michael Niedermayer2012-11-131-1/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b': (21 commits) jvdec: set channel layout iss: set channel layout ipmovie: set channel layout iff: set channel layout idroqdec: set channel layout gxfdec: set channel layout when applicable gsmdec: set channel layout flvdec: set channel layout dv: set channel layout dsicin: set channel layout daud: set channel layout cdxl: set channel layout bmv: set channel layout bink: set channel layout bfi: set channel layout bethsoftvid: set channel layout apc: set channel layout amr: set channel_layout ppc: replace pointer casting with AV_COPY32 ppc: fix some unused variable warnings ... Conflicts: libavformat/amr.c libavformat/iff.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * bink: set channel layoutJustin Ruggles2012-11-121-1/+8
| |
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-2/+2
| |
| * bink: Check return value of avio_seek and avoid modifying state if it failsJoakim Plate2012-02-101-1/+3
| | | | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | bink: check av_mallocz() return valuePaul B Mahol2012-06-091-0/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-281-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (71 commits) movenc: Allow writing to a non-seekable output if using empty moov movenc: Support adding isml (smooth streaming live) metadata libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set sunrast: Document the different Sun Raster file format types. sunrast: Add a check for experimental type. libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat lavf: remove disabled FF_API_SET_PTS_INFO cruft lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft lavf: remove disabled FF_API_REORDER_PRIVATE cruft lavf: remove disabled FF_API_SEEK_PUBLIC cruft lavf: remove disabled FF_API_STREAM_COPY cruft lavf: remove disabled FF_API_PRELOAD cruft lavf: remove disabled FF_API_NEW_STREAM cruft lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft lavf: remove disabled FF_API_MUXRATE cruft lavf: remove disabled FF_API_FILESIZE cruft lavf: remove disabled FF_API_TIMESTAMP cruft lavf: remove disabled FF_API_LOOP_OUTPUT cruft lavf: remove disabled FF_API_LOOP_INPUT cruft lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft ... Conflicts: doc/APIchanges libavcodec/8bps.c libavcodec/avcodec.h libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/options.c libavcodec/sunrast.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/h264_deblock.asm libavdevice/libdc1394.c libavdevice/v4l2.c libavformat/avformat.h libavformat/avio.c libavformat/avio.h libavformat/aviobuf.c libavformat/dv.c libavformat/mov.c libavformat/utils.c libavformat/version.h libavformat/wtv.c libavutil/Makefile libavutil/file.c libswscale/x86/input.asm libswscale/x86/swscale_mmx.c libswscale/x86/swscale_template.c tests/ref/lavf/ffm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-271-1/+1
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-011-2/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtpdec: Templatize the code for different g726 bitrate variants rv40: move loop filter to rv34dsp context lavf: make av_set_pts_info private. rtpdec: Add support for G726 audio rtpdec: Add an init function that can do custom codec context initialization avconv: make copy_tb on by default. matroskadec: don't set codec timebase. rmdec: don't set codec timebase. avconv: compute next_pts from input packet duration when possible. lavf: estimate frame duration from r_frame_rate. avconv: update InputStream.pts in the streamcopy case. Conflicts: avconv.c libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/fbdev.c libavdevice/libdc1394.c libavdevice/oss_audio.c libavdevice/v4l.c libavdevice/v4l2.c libavdevice/vfwcap.c libavdevice/x11grab.c libavformat/au.c libavformat/eacdata.c libavformat/flvdec.c libavformat/mpegts.c libavformat/mxfenc.c libavformat/rtpdec_g726.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: make av_set_pts_info private.Anton Khirnov2011-11-301-2/+3
| | | | | | | | It's supposed to be called only from (de)muxers.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-201-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: presets: rename presets directory lavc: make avcodec_get_context_defaults3 "officially" public lavf: replace av_new_stream->avformat_new_stream part II. lavf,lavd: replace av_new_stream->avformat_new_stream part I. lavf: add avformat_new_stream as a replacement for av_new_stream. Use correct scaling table for bwd-pred MVs in second B-field Ut Video decoder Makefile: change presets extension to .avpreset lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs lavfi: add testsrc source AVOptions: add documentation. presets: update libx264 ffpresets Conflicts: Changelog doc/APIchanges doc/ffmpeg.texi ffpresets/libx264-ipod320.ffpreset ffpresets/libx264-ipod640.ffpreset ffserver.c libavcodec/avcodec.h libavcodec/options.c libavcodec/version.h libavdevice/libdc1394.c libavfilter/avfilter.h libavfilter/vsrc_testsrc.c libavformat/flvdec.c libavformat/riff.c libavformat/version.h libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: replace av_new_stream->avformat_new_stream part II.Anton Khirnov2011-10-191-1/+1
| | | | | | | | | | | | | | | | Manual replacements are done in this commit. In many cases, the id is some constant made up number (e.g. 0 for video and 1 for audio), which is then not used in the demuxer for anything. Those ids are removed.
| * lavf,lavd: replace av_new_stream->avformat_new_stream part I.Anton Khirnov2011-10-191-1/+1
| | | | | | | | | | Trivial replacements with sed are done in this commit: sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
* | [bink] Check return value of avio_seek and avoid modifying state if it failsJoakim Plate2011-09-141-1/+3
| |