summaryrefslogtreecommitdiff
path: root/libavformat/bit.c
Commit message (Collapse)AuthorAge
* avformat: Make init function out of write_header functions if possibleAndreas Rheinhardt2024-03-22
| | | | | | Also mark them as av_cold while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Add flag for "only default codecs allowed"Andreas Rheinhardt2024-03-22
| | | | | | | | AVOutputFormat has default codecs for audio, video and subtitle and often these are the only codecs of this type allowed. So add a flag to AVOutputFormat so that this can be checked generically. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Enforce one-stream limit where appropriateAndreas Rheinhardt2024-03-22
| | | | | | | | | | Several muxers (e.g. pcm muxers) did not check the number of streams even though the individual streams were not recoverable from the muxed files. This commit changes this by using the FF_OFMT_MAX_ONE_OF_EACH flag where appropriate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avformat: Add FFInputFormat, hide internals of AVInputFormatAndreas Rheinhardt2024-03-07
| | | | | | | | | | | | | | | | | | | | | 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>
* avformat/avformat: Move AVOutputFormat internals out of public headerAndreas Rheinhardt2023-02-09
| | | | | | | | | | | | | | This commit does for AVOutputFormat what commit 20f972701806be20a77f808db332d9489343bb78 did for AVCodec: It adds a new type FFOutputFormat, moves all the internals of AVOutputFormat to it and adds a now reduced AVOutputFormat as first member. This does not affect/improve extensibility of both public or private fields for muxers (it is still a mess due to lavd). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* bit: convert to new channel layout APIAnton Khirnov2022-03-15
| | | | 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>
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-12
| | | | | | | | | | 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-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* lavf/bit: Fix the G.729 bit auto-detection.Carl Eugen Hoyos2017-09-30
|
* lavf/bit: Use pkt->size instead of a constant for G.729 frame size.Carl Eugen Hoyos2017-09-29
| | | | Makes the code more readable, the muxer may support variable bit-rate in the future.
* lavf/bit: Only build the G.729 bit demuxer if requested.Carl Eugen Hoyos2017-09-29
| | | | Fix the condition for the G.729 bit muxer.
* 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>
* avformat/bit: only accept the g729 codec and 1 channelAndreas Cadhalpun2015-02-26
| | | | | | | Other codecs/channel numbers are not supported by this muxer. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/bit: check that pkt->size is 10 in write_packetAndreas Cadhalpun2015-02-26
| | | | | | | | | Ohter packet sizes are not supported by this muxer. This avoids a null pointer dereference of pkt->data. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* 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>
* avformat: replace "AVPROBE_SCORE_MAX / X" by AVPROBE_SCORE_EXTENSION / YMichael Niedermayer2013-05-05
| | | | | | Demuxers where the changed code looked less readable where skiped Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: remove some flushing in write_packet muxers callbacks.Clément Bœsch2013-04-14
| | | | | Since 4f112a8e3, this is not necessary anymore. Also, it allows to actually disable the flushing.
* bit: check av_new_packet() return valuePaul B Mahol2012-10-26
| | | | | | Fixes CID703626. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* clenaup: #ifdec CONFIG*Michael Niedermayer2011-12-13
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: rename remaining av_set_pts_info() to avpriv_set_pts_info().Clément Bœsch2011-12-03
|
* Rename remaining ByteIOContext to AVIOContext.Clément Bœsch2011-11-14
|
* Fix deprecated warnings in .bit (de)muxerVladimir Voroshilov2011-10-30
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Add Vladimir Voroshilov's copyright header to bit.c.Carl Eugen Hoyos2011-10-29
|
* bit: require at least 1 frame for probingMichael Niedermayer2011-10-16
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bit: remove more unused variablesMichael Niedermayer2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bit: use AVERROR_INVALIDDATAMichael Niedermayer2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bit: use explicit struct initializers.Clément Bœsch2011-09-25
|
* bit: remove unused variableMichael Niedermayer2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bit: set AVPacket.posMichael Niedermayer2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bit: loose seekback & wrong bitrate code.Michael Niedermayer2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bit: rewrite probeMichael Niedermayer2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bit: replace assert() by proper check.Michael Niedermayer2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bit: return AVERROR_EOF on eof.Michael Niedermayer2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Removed debug message in the probe function of bit demuxer.Laurent Aimar2011-09-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Add .bit (de)muxerVladimir Voroshilov2011-09-24