summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-12 05:33:52 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-12 05:40:57 +0200
commitb81f8880e010ccdef3604d9beb681d3c4c6a7bc0 (patch)
tree0a6534f8fd2d53e84f6b5716047e473b1598cd3d /libavformat/id3v2.c
parentb75d89a4784e027cec99236d58e9bd4121ec4309 (diff)
parent5f3fb599536dd5bceb1d45cb73cd0b0ce3e5560c (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits) fix AC3ENC_OPT_MODE_ON/OFF h264: fix HRD parameters parsing prores: implement multithreading. prores: idct sse2/sse4 optimizations. swscale: use aligned move for storage into temporary buffer. prores: extract idct into its own dspcontext and merge with put_pixels. h264: fix invalid shifts in init_cavlc_level_tab() intfloat_readwrite: fix signed addition overflows mov: do not misreport empty stts mov: cosmetics, fix for and if spacing id3v2: fix NULL pointer dereference mov: read album_artist atom mov: fix disc/track numbers and totals doc: fix references to obsolete presets directories for avconv/ffmpeg flashsv: return more meaningful error value flashsv: fix typo in av_log() message smacker: validate channels and sample format. smacker: check buffer size before reading output size smacker: validate number of channels smacker: Separate audio flags from sample rates in smacker demuxer. ... Conflicts: cmdutils.h doc/ffmpeg.texi libavcodec/Makefile libavcodec/motion_est_template.c libavformat/id3v2.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 48124cee84..22a2df79e0 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -360,7 +360,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
AVIOContext *pbx;
unsigned char *buffer = NULL;
int buffer_size = 0;
- void (*extra_func)(AVFormatContext*, AVIOContext*, int, char*, ID3v2ExtraMeta**) = NULL;
+ const ID3v2EMFunc *extra_func;
switch (version) {
case 2:
@@ -432,7 +432,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
av_log(s, AV_LOG_WARNING, "Skipping encrypted/compressed ID3v2 frame %s.\n", tag);
avio_skip(s->pb, tlen);
/* check for text tag or supported special meta tag */
- } else if (tag[0] == 'T' || (extra_meta && (extra_func = get_extra_meta_func(tag, isv34)->read))) {
+ } else if (tag[0] == 'T' || (extra_meta && (extra_func = get_extra_meta_func(tag, isv34)))) {
if (unsync || tunsync) {
int i, j;
av_fast_malloc(&buffer, &buffer_size, tlen);
@@ -458,7 +458,7 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
read_ttag(s, pbx, tlen, tag);
else
/* parse special meta tag */
- extra_func(s, pbx, tlen, tag, extra_meta);
+ extra_func->read(s, pbx, tlen, tag, extra_meta);
}
else if (!tag[0]) {
if (tag[1])
@@ -521,11 +521,11 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic)
void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta)
{
ID3v2ExtraMeta *current = *extra_meta, *next;
- void (*free_func)(void *);
+ const ID3v2EMFunc *extra_func;
while (current) {
- if ((free_func = get_extra_meta_func(current->tag, 1)->free))
- free_func(current->data);
+ if ((extra_func = get_extra_meta_func(current->tag, 1)))
+ extra_func->free(current->data);
next = current->next;
av_freep(&current);
current = next;