summaryrefslogtreecommitdiff
path: root/libavformat/id3v2enc.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/id3v2enc: use av_dict_iterateMarvin Scholz2022-12-011-5/+5
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Move creation-time functions to mux_utilsAndreas Rheinhardt2022-05-101-0/+1
| | | | | | Only used by muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/id3v2enc: fix bad ID3v2 tag lengthGilles Bouthenot2020-01-101-3/+3
|
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-121-9/+9
| | | | | | | | | | 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>
* avformat/id3v2enc: Avoid allocation for small tagsAndreas Rheinhardt2019-11-281-21/+16
| | | | | | | | By using avio_get_dyn_buf() + ffio_free_dyn_buf() instead of avio_close_dyn_buf() + av_free() one can avoid an allocation + copy for small tags. Furthermore, it simplifies freeing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/id3v2enc: fix bug, CTOC flags take only one bytePaul B Mahol2019-06-131-1/+1
|
* avformat/id3v2enc: write CTOC tooPaul B Mahol2019-06-071-0/+39
|
* avformat: add option to parse/store ID3 PRIV tags in metadata.Richard Shaffer2018-01-241-0/+60
| | | | | | | | | | | | | | Enables getting access to ID3 PRIV tags from the command-line or metadata API when demuxing. The PRIV owner is stored as the metadata key prepended with "id3v2_priv.", and the data is stored as the metadata value. As PRIV tags may contain arbitrary data, non-printable characters, including NULL bytes, are escaped as \xXX. Similarly, any metadata tags that begin with "id3v2_priv." are inserted as ID3 PRIV tags into the output (assuming the format supports ID3). \xXX sequences in the value are un-escaped to their byte value. Signed-off-by: wm4 <nfxjfg@googlemail.com>
* 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>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | avformat: use ff_standardize_creation_time for formats writing all format ↵Marton Balint2016-03-031-0/+1
| | | | | | | | | | | | | | string metadata Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | Merge commit '9279826008b80daad7446950a821f32033ccd33f'Michael Niedermayer2014-07-041-1/+1
|\ \ | |/ | | | | | | | | | | * commit '9279826008b80daad7446950a821f32033ccd33f': id3v2enc: use a case-insensitive comparison for APIC picture type Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2enc: use a case-insensitive comparison for APIC picture typeAnton Khirnov2014-07-031-1/+2
| |
* | lavf/id3v2enc: update comment about minimum paddingJames Darnley2014-01-241-4/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/id3v2enc: use metadata_header_paddingJames Darnley2014-01-241-6/+13
| | | | | | | | | | | | | | As with the change to flacenc this allows the user to control the amount of padding they want added to the file. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/id3v2enc: use UTF-16 in id3v2.3 APIC frame only if non-ASCIIMark Harris2013-08-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the encoding of picture descriptions consistent with the encoding of other text id3 tags and works better with iTunes, which does not display pictures with some UTF-16 picture descriptions (including a UTF-16 empty string, i.e. BOM + terminator). It also saves a few bytes. Example: ffmpeg -f lavfi -i sine=b=4 -f lavfi -i smptebars -map 0:a -map 1:v \ -codec:a libmp3lame -codec:v mjpeg -id3v2_version 3 \ -metadata:s:v comment="Cover (front)" -t 3 -y out.mp3 This example does not set a picture description (-metadata:s:v title=) so an empty string is written in the id3v2.3 APIC frame. Without this patch, UTF-16 is used and the cover art does not display in iTunes. With the patch the cover art is displayed. (Note that iTunes does not display or have a way to set picture descriptions, only the picture itself, but nevertheless has trouble skipping some UTF-16 descriptions.) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/id3v2enc: fix cover art display on some softwareMatthieu Bouron2013-05-301-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding an arbitrary amount of padding bytes at the end of the ID3 metadata fixes cover art display for some software (iTunes, Traktor, Serato, Torq). For reference (ID3 metadata): [ Apic frames ] -> cover doesn't show up [ Apic frames, Padding ] -> ok [ Apic frames, ID3 frames ] -> ok [ ID3 frames, Apic frames ] -> cover doesn't show up [ ID3 frames, Apic frames, Padding ] -> ok
* | id3v2enc: chapter supportPaul B Mahol2013-05-171-13/+69
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1/+1
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-011-47/+145
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (58 commits) amrnbdec: check frame size before decoding. cscd: use negative error values to indicate decode_init() failures. h264: prevent overreads in intra PCM decoding. FATE: do not decode audio in the nuv test. dxa: set audio stream time base using the sample rate psx-str: do not allow seeking by bytes asfdec: Do not set AVCodecContext.frame_size vqf: set packet parameters after av_new_packet() mpegaudiodec: use DSPUtil.butterflies_float(). FATE: add mp3 test for sample that exhibited false overreads fate: add cdxl test for bit line plane arrangement vmnc: return error on decode_init() failure. libvorbis: add/update error messages libvorbis: use AVFifoBuffer for output packet buffer libvorbis: remove unneeded e_o_s check libvorbis: check return values for functions that can return errors libvorbis: use float input instead of s16 libvorbis: do not flush libvorbis analysis if dsp state was not initialized libvorbis: use VBR by default, with default quality of 3 libvorbis: fix use of minrate/maxrate AVOptions ... Conflicts: Changelog doc/APIchanges libavcodec/avcodec.h libavcodec/dpxenc.c libavcodec/libvorbis.c libavcodec/vmnc.c libavformat/asfdec.c libavformat/id3v2enc.c libavformat/internal.h libavformat/mp3enc.c libavformat/utils.c libavformat/version.h libswscale/utils.c tests/fate/video.mak tests/ref/fate/nuv tests/ref/fate/prores-alpha tests/ref/lavf/ffm tests/ref/vsynth1/prores tests/ref/vsynth2/prores Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2enc: add a function for writing attached pictures.Anton Khirnov2012-02-291-9/+82
| | | | | | | | Unused so far.
| * id3v2enc: fix writing frame sizes for ID3v2.3Anton Khirnov2012-02-291-11/+15
| | | | | | | | | | | | | | Frame sizes in ID3v2.3 are not synchsafe, they are simply 32be numbers. In practice this bug is not noticeable unless the frame size takes more than 7 bits (which is almost never for text frames).
| * id3v2enc: split ff_id3v2_write().Anton Khirnov2012-02-291-22/+42
| | | | | | | | | | This will allow writing the tag in several steps, needed for writing attached pictures.
| * id3v2enc: make id3v2_put_size take only an AVIOContext.Anton Khirnov2012-02-291-7/+7
| | | | | | | | It has no need of full AVFormatContext.
* | id3v2enc: av_strcasecmp()Michael Niedermayer2011-11-031-2/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | id3v2enc: include strings.h for strcasecmp()Michael Niedermayer2011-11-021-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | id3v2enc: add support for year and day/month tags when writing id3v2 version ↵Tobias Rapp2011-11-021-1/+42
| | | | | | | | | | | | | | | | | | | | 3 metadata Adds support for year (TYER) and day/month (TDAT) tags when writing id3v2 version 3 metadata by splitting the "date" tag. The date tag should have a format of "YYYY-MM-DD" or "YYYY". Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-241-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | * qatar/master: Move id3v2 tag writing to a separate file. swscale: add missing colons to x86 assembly yuv2planeX. g722: split decoder and encoder into separate files cosmetics: remove extra spaces before end-of-statement semi-colons vorbisdec: check output buffer size before writing output wavpack: calculate bpp using av_get_bytes_per_sample() ac3enc: Set max value for mode options correctly lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c mpeg12: move closed_gop from MpegEncContext to Mpeg1Context mpeg12: move full_pel from MpegEncContext to Mpeg1Context mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.h mpegvideo: remove some unused variables from MpegEncContext. Conflicts: libavcodec/mpeg12.c libavformat/mp3enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Move id3v2 tag writing to a separate file.Michael Karcher2011-10-231-0/+146
Signed-off-by: Diego Biurrun <diego@biurrun.de>