Anssi Hannula
53765ae33b
avformat/id3v2: parse ID3 Private frames as extra metadata
...
They are used in HLS.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
11 years ago
Carl Eugen Hoyos
05c3c568dc
Read pictures in id3v2.2
11 years ago
Michael Niedermayer
ffbcb1c6f0
avformat/id3v2: Check avio_read() return value in read_chapter()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
460f8fca9c
avformat/id3v2: factor free code to the end of read_chapter()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
476aceaa22
vformat/id3v2: check avio_read for short reads in addition to errors
...
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0e0f6bd4a5
avformat/id3v2: Check avio_read() return code in id3v2_parse()
...
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>
11 years ago
Michael Niedermayer
6241e8a382
id2v2: check the return value of decode_str()
...
Fixes CID1030348
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
379fcc4955
id3v2: read all textual chapter subframes
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
f5846dc98c
id3v2: stop ignoring text encoding for chapter titles
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Luca Barbato
af4cc2605c
id3v2: check for end of file while unescaping tags
...
Prevent a serious out of buffer bound write.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
12 years ago
Luca Barbato
0671adbb18
id3v2: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Diego Biurrun
e926b5ceb1
avformat: Drop unnecessary ff_ name prefixes from static functions
12 years ago
Anton Khirnov
8d617b11cf
id3v2: pad the APIC packets as required by lavc.
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Michael Niedermayer
24cfe91a22
id3v2: allocate large enough buffer
...
Fixes array overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
1afddbe59e
avpacket: use AVBuffer to allow refcounting the packets.
...
This will allow us to avoid copying the packets in many cases.
This breaks ABI.
12 years ago
Matthieu Bouron
b3b456b258
lavf/id3v2: seek back to previous offset if header size is not matched
...
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>
12 years ago
Matthieu Bouron
61625565e4
lavf/id3v2: cosmetics: reindent
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
10416a4d56
id3v2: check index against buffer size. Fix out of array access
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e9c372362c
id3v2: restructure compressed and unsync code
...
This should fix the interaction between the 2.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
08e26e7f5c
id3v2: print ver/flags/len on debug level.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
9ae80e6a9c
id3v2: fix reading unsynchronized frames.
...
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
12 years ago
Paul B Mahol
07ed191b15
parse ID3v2 chapters
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Clément Bœsch
049ce4facb
id3v2: strdup the genre name explicitly.
...
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>
12 years ago
Clément Bœsch
ffdd2e9144
lavf/id3v2: do not export empty fields.
...
This also avoids a memleak.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Piotr Bandurski
5081310b58
lavf: add missing new line to some error messages 2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mohammad Alsaleh
6e9bbc6525
id3v2: Match PIC mimetype/format case-insensitively
...
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>
13 years ago
Mohammad Alsaleh
385ec296f1
id3v2: Support v2.2 PIC
...
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>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Anton Khirnov
25b51b2c44
id3v2: add a mimetype for bmp pictures.
13 years ago
Piotr Bandurski
4d18f4c15b
id3v2: reject APICs with size of 0
...
fixes ticket #1324
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
e5fcf3646a
lavf/id3v2: always strdup the value.
...
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().
13 years ago
Clément Bœsch
6ad974ae1c
lavf/id3v2: do not export empty fields.
...
This also avoids a memleak.
13 years ago
Anton Khirnov
ddb4431208
id3v2: fix skipping extended header in id3v2.4
...
In v2.4, the length includes the length field itself.
13 years ago
Kostya Shishkov
f704eb612b
id3v2: add another mimetype for JPEG image
13 years ago
Piotr Bandurski
3c6397404b
id3v2: support JPEG APIC with incorrect (image/jpg) MIME type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
713f3062a7
id3v2: set the keyframe flag on attached pictures.
13 years ago
Anton Khirnov
393fd0d89e
id3v2: remove unused ff_id3v2_read().
...
Rename ff_id3v2_read_all to ff_id3v2_read().
13 years ago
Anton Khirnov
079ea6ca5f
lavf: export id3v2 attached pictures as streams.
13 years ago
Anton Khirnov
a93b09cb45
id3v2: read attached pictures and export them in ID3v2ExtraMeta.
13 years ago
Jean First
acc88f07d4
id3v2: fix compiler warning for uninitialized variables
...
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
084bd109fc
id3v2: fix variable type for uncompress()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Adrian Drzewiecki
7e09fe15d5
Process compressed id3v2 tags.
...
ID3v2.4 allows for zlib compressed tags, but libavformat skips them.
Implement code to inflate compressed tags.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
da9cea77e3
Fix a bunch of common typos.
13 years ago
Michael Niedermayer
aedd30b63a
id3v2: Fix null ptr crash in get_extra_meta_func()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Adrian Drzewiecki
dd7453a24e
Fix id3v2 extended header handling.
...
When skipping over the extended header, take into account
that the size field has already been read. The extended header
also takes up space, so adjust total header length accordingly.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
ec22979a1d
id3v2: fix type of ID3v2EMFunc.free()
13 years ago
Diego Biurrun
c4a378855e
id3v2: reduce the scope of some non-globally-used symbols/structures
13 years ago
Diego Biurrun
3b78c180e4
id3v2: cosmetics: move some declarations before the places they are used
13 years ago
Anton Khirnov
c780b543e7
id3v2: fix NULL pointer dereference
...
Bug found by Laurent Aimar fenrir at videolan org
13 years ago
Anton Khirnov
60df6b0048
id3v2: remove pointless casts
13 years ago