aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/smush.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/smush: read ANIMv2 a/v parametersManuel Lauss2024-12-091-3/+14
| | | | | | | | | | | | | | SMUSH ANIM files with subversion 2 provide additional fields for framerate and samplerate, use them if available, otherwise default to 12 fps which is the default for almost all ANIMv2 since 1995. Fixes the too-fast playback of test files from LucasArts games released 1995-1997. It was not noticed since Audio for those isn't decoded by ffmpeg. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/avformat: Add FFInputFormat, hide internals of AVInputFormatAndreas Rheinhardt2024-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | | This commit does for AVInputFormat what commit 59c9dc82f450638a3068deeb1db5c56f6d155752 did for AVOutputFormat: It adds a new type FFInputFormat, moves all the internals of AVInputFormat to it and adds a now reduced AVInputFormat as first member. This does not affect/improve extensibility of both public or private fields for demuxers (it is still a mess due to lavd). This is possible since 50f34172e0cca2cabc5836308ec66dbf93f5f2a3 (which removed the last usage of an internal field of AVInputFormat in fftools). (Hint: tools/probetest.c accesses the internals of FFInputFormat as well, but given that it is a testing tool this is not considered a problem.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* smush: convert to new channel layout APIVittorio Giovara2022-03-151-2/+1
| | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.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>
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-121-2/+3
| | | | | | | | | | 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
* Merge commit '67351924fa91dea4339109100a4c0689f006581f'Clément Bœsch2017-03-301-1/+0
|\ | | | | | | | | | | | | * commit '67351924fa91dea4339109100a4c0689f006581f': Drop unreachable break and return statements Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Drop unreachable break and return statementsDiego Biurrun2016-11-031-1/+0
| |
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-14/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | 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 'eeadcdfd1a6f3089b6bf6e194d6ece8d3f113123'Michael Niedermayer2014-04-061-18/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'eeadcdfd1a6f3089b6bf6e194d6ece8d3f113123': LucasArts SMUSH demuxer Conflicts: Changelog doc/general.texi libavformat/smush.c libavformat/version.h See: bef8fd7099edfac9c487e6eb75d7e6116ad80465 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * LucasArts SMUSH demuxerPaul B Mahol2014-04-061-0/+256
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-3/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* smush: check audio packet sizePaul B Mahol2012-11-171-1/+1
| | | | | | Fixes null pointer dereference. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* smush: improve probingPaul B Mahol2012-11-041-2/+4
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* smush: read subversion for version==1 too.Michael Niedermayer2012-09-091-1/+1
| | | | | | | This avoids a gcc warning, otherwise it should have no effect. its a bit more consistent too Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* 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>
* smush: properly flag audio packetsPaul B Mahol2012-07-081-0/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* smush: set audio packet durationPaul B Mahol2012-06-211-0/+5
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* LucasArts SMUSH demuxerPaul B Mahol2012-06-211-0/+232
Signed-off-by: Paul B Mahol <onemda@gmail.com>