summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
Commit message (Collapse)AuthorAge
* Use correct msvc type specifiers for ptrdiff_t and size_t.Carl Eugen Hoyos2014-04-24
| | | | | | | The Windows runtime aborts if it finds %t or %z. Fixes ticket #3472. Reviewed-by: Ronald Bultje
* ff_id3v2_read: add option to limit ID3 magic number searchPeter Ross2014-04-19
| | | | | | | | | | | | | | Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 ' chunk tag. If such chunks are stored sequentially, it is possible for the ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g. [1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...] [2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...] Fixes ticket #3530. Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ff_id3v2_free_extra_meta: set the pointer pointing to extra_meta to NULLPeter Ross2014-04-19
| | | | | | | Fixes ticket #3530. Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/id3v2: decode compilation metadataPeter Ross2014-03-15
| | | | | | | Described http://id3.org/iTunes%20Compilation%20Flag Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/id3v2: allow ID3 parsing without AVFormatContextAnssi Hannula2013-12-31
| | | | | | | | | | | | | | | | Add ff_id3v2_read_dict() for parsing without AVFormatContext, but instead with AVIOContext and AVDictionary. AVFormatContext is still used for logging, if available. Chapter parsing is the only non-logging functionality that actually needs AVFormatContext, and AFAICS it should be modified to write the data to ID3v2ExtraMeta first, from where it can be implanted to AVFormatContext by a separate function (like it is done with read_apic() and ff_id3v2_parse_apic()). That is outside the scope of this patch, though. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
* avformat/id3v2: parse ID3 Private frames as extra metadataAnssi Hannula2013-12-31
| | | | | | They are used in HLS. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
* Read pictures in id3v2.2Carl Eugen Hoyos2013-12-23
|
* avformat/id3v2: Check avio_read() return value in read_chapter()Michael Niedermayer2013-12-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/id3v2: factor free code to the end of read_chapter()Michael Niedermayer2013-12-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* vformat/id3v2: check avio_read for short reads in addition to errorsMichael Niedermayer2013-12-15
| | | | | Found-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/id3v2: Check avio_read() return code in id3v2_parse()Michael Niedermayer2013-12-15
| | | | | | | Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f5a04a9b50d_7087_mp3__mp3__tooSmallFinal.mp3 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* id2v2: check the return value of decode_str()Michael Niedermayer2013-06-09
| | | | | Fixes CID1030348 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* id3v2: read all textual chapter subframesPaul B Mahol2013-06-07
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* id3v2: stop ignoring text encoding for chapter titlesPaul B Mahol2013-05-06
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-05-03
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: compat: msvc: Make sure the object files are included when linking statically id3v2: check for end of file while unescaping tags Conflicts: configure libavformat/id3v2.c Note, ffmpeg is not affected by the out of buffer write bug Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2: check for end of file while unescaping tagsLuca Barbato2013-05-03
| | | | | | | | | | | | | | Prevent a serious out of buffer bound write. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-05-02
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: id3v2: K&R formatting cosmetics ppc: Only compile AltiVec FFT assembly when AltiVec is enabled Conflicts: libavformat/id3v2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2: K&R formatting cosmeticsLuca Barbato2013-05-02
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'e926b5ceb1962833f0c884a328382bc2eca67aff'Michael Niedermayer2013-05-01
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e926b5ceb1962833f0c884a328382bc2eca67aff': avformat: Drop unnecessary ff_ name prefixes from static functions Conflicts: libavformat/audiointerleave.c libavformat/mux.c libavformat/mxfenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Drop unnecessary ff_ name prefixes from static functionsDiego Biurrun2013-04-30
| |
* | Merge commit '8d617b11cfc87b2c6056fee029ac5bc760af874a'Michael Niedermayer2013-04-04
|\| | | | | | | | | | | | | | | | | | | | | * commit '8d617b11cfc87b2c6056fee029ac5bc760af874a': id3v2: pad the APIC packets as required by lavc. dfa: check for invalid access in decode_wdlt(). Conflicts: libavformat/id3v2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2: pad the APIC packets as required by lavc.Anton Khirnov2013-04-04
| | | | | | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | id3v2: allocate large enough bufferMichael Niedermayer2013-03-29
| | | | | | | | | | | | | | Fixes array overread Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'Michael Niedermayer2013-03-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1afddbe59e96af75f1c07605afc95615569f388f': avpacket: use AVBuffer to allow refcounting the packets. Conflicts: libavcodec/avpacket.c libavcodec/utils.c libavdevice/v4l2.c libavformat/avidec.c libavformat/flacdec.c libavformat/id3v2.c libavformat/matroskaenc.c libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | | | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* | lavf/id3v2: seek back to previous offset if header size is not matchedMatthieu Bouron2013-01-20
| | | | | | | | | | | | | | | | | | | | | | | | Makes ff_id3v2_read reset stream position at the end of ID3 data if the header size is not matched (caused by an EOF for example). Current behaviour (without the patch): filesize = 400 id3 data size = 399 file offset after ff_id3v2_read is 400 instead of 399 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/id3v2: cosmetics: reindentMatthieu Bouron2013-01-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | id3v2: check index against buffer size. Fix out of array accessMichael Niedermayer2012-11-29
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | id3v2: restructure compressed and unsync codeMichael Niedermayer2012-11-23
| | | | | | | | | | | | This should fix the interaction between the 2. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | id3v2: print ver/flags/len on debug level.Michael Niedermayer2012-11-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-11-22
|\| | | | | | | | | | | | | | | | | | | | | | | * qatar/master: id3v2: fix reading unsynchronized frames. cdgraphics: fix incorrect vertical offset mask in cdg_scroll() apetag: fix error handling in ff_ape_parse_tag() Conflicts: libavformat/id3v2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2: fix reading unsynchronized frames.Anton Khirnov2012-11-22
| | | | | | | | | | | | | | | | | | Current code would incorrectly process e.g. 'ff 00 ff 00 ff' to 'ff ff ff', while it should be 'ff ff 00 ff'. Fixes Bug 395. CC: libav-stable@libav.org
| * id3v2: strdup the genre name explicitly.Clément Bœsch2012-09-17
| | | | | | | | | | | | | | | | | | It would have been done anyway in the av_dict_set() call. This simplifies the code and avoid a warning because of assigning a const string from ff_id3v1_genre_str to a non-const variable. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * lavf/id3v2: do not export empty fields.Clément Bœsch2012-09-17
| | | | | | | | | | | | This also avoids a memleak. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | parse ID3v2 chaptersPaul B Mahol2012-10-28
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavf: add missing new line to some error messages 2Piotr Bandurski2012-09-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: Detect discontinuities in timestamps for framerate/analyzeduration calculation lavf: Initialize the stream info timestamps in avformat_new_stream id3v2: Match PIC mimetype/format case-insensitively configure: Rename check_asm() to more fitting check_inline_asm() fate: Only test enabled filters avresample: De-doxygenize some comments where Doxygen is not appropriate rtmp: split chunk_size var into in_chunk_size and out_chunk_size rtmp: Factorize the code by adding find_tracked_method Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2: Match PIC mimetype/format case-insensitivelyMohammad Alsaleh2012-08-12
| | | | | | | | | | | | | | | | | | | | | | Some files' embedded art seems to have the mimetype 'image/JPG' instead of 'image/jpg'. Libav fails to parse those because it matches case-sensitively. Use av_strncasecmp() to fix this behaviour. Signed-off-by: Mohammad Alsaleh <msal@tormail.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) build: cosmetics: Reorder some lists in a more logical fashion x86: pngdsp: Fix assembly for OS/2 fate: add test for RTjpeg in nuv with frameheader rtmp: send check_bw as notification g723_1: clip argument for 15-bit version of normalize_bits() g723_1: use all LPC vectors in formant postfilter id3v2: Support v2.2 PIC avplay: fix build with lavfi disabled. avconv: split configuring filter configuration to a separate file. avconv: split option parsing into a separate file. mpc8: do not leave padding after last frame in buffer for the next decode call mpegaudioenc: list supported channel layouts. mpegaudiodec: don't print an error on > 1 frame in a packet. api-example: update to new audio encoding API. configure: add --enable/disable-random option doc: cygwin: Update list of FATE package requirements build: Remove all installed headers and header directories on uninstall build: change checkheaders to use regular build rules rtmp: Add a new option 'rtmp_subscribe' rtmp: Add support for subscribing live streams ... Conflicts: Makefile common.mak configure doc/examples/decoding_encoding.c ffmpeg.c libavcodec/g723_1.c libavcodec/mpegaudiodec.c libavcodec/x86/pngdsp.asm libavformat/version.h library.mak tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2: Support v2.2 PICMohammad Alsaleh2012-08-08
| | | | | | | | | | | | | | | | | | | | | | | | id3 v2.2 uses image format ("JPG","PNG") instead of mimetypes. Currently, the attached picture is skipped because the format string does not match a known picture mimetype. This patch fixes this behaviour. Signed-off-by: Mohammad Alsaleh <msal@tormail.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | 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>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cmutils: include shellapi.h on Win32 (for CommandLineToArgvW). x86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME). id3v2: add a mimetype for bmp pictures. flacdec: be less strict when parsing attached pictures. flacdec: don't create an attached picture stream until we have all information. Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2: add a mimetype for bmp pictures.Anton Khirnov2012-07-07
| |
* | id3v2: reject APICs with size of 0Piotr Bandurski2012-05-20
| | | | | | | | | | | | fixes ticket #1324 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/id3v2: always strdup the value.Clément Bœsch2012-05-19
| | | | | | | | | | | | This simplifies the code but also fix a warning: ff_id3v1_genre_str array contains const strings so do the string dup now instead of in av_dict_set().
* | lavf/id3v2: do not export empty fields.Clément Bœsch2012-05-19
| | | | | | | | This also avoids a memleak.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-02
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: vsrc_buffer: allow buffering arbitrary number of frames. vf_scale: avoid a pointless memcpy in no-op conversion. avfiltergraph: try to reduce format conversions in filters. avfiltergraph: add an AVClass to AVFilterGraph on next major bump. id3v2: fix skipping extended header in id3v2.4 Conflicts: libavfilter/vf_scale.c libavfilter/vsrc_buffer.c libavformat/id3v2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * id3v2: fix skipping extended header in id3v2.4Anton Khirnov2012-04-01
| | | | | | | | In v2.4, the length includes the length field itself.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mp3dec: perform I/S and M/S only when frame mode is joint stereo. id3v2: add another mimetype for JPEG image lzw: prevent buffer overreads. WMAL: Remove inaccurate and unnecessary doxy h264: fix cabac-on-stack after safe cabac reader. truemotion2: convert packet header reading to bytestream2. Conflicts: libavcodec/lzw.c libavcodec/truemotion2.c libavformat/id3v2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>