OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6eda91a
)
avformat/id3v2: factor free code to the end of read_chapter()
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 15 Dec 2013 19:56:34 +0000
(20:56 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 15 Dec 2013 20:43:19 +0000
(21:43 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/id3v2.c
patch
|
blob
|
history
diff --git
a/libavformat/id3v2.c
b/libavformat/id3v2.c
index
c2bd56f
..
effaaf4
100644
(file)
--- a/
libavformat/id3v2.c
+++ b/
libavformat/id3v2.c
@@
-549,10
+549,8
@@
static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, char *tta
taglen = avio_rb32(pb);
avio_skip(pb, 2);
len -= 10;
- if (taglen < 0 || taglen > len) {
- av_free(dst);
- return;
- }
+ if (taglen < 0 || taglen > len)
+ goto end;
if (tag[0] == 'T')
read_ttag(s, pb, taglen, &chapter->metadata, tag);
else
@@
-562,6
+560,7
@@
static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, char *tta
ff_metadata_conv(&chapter->metadata, NULL, ff_id3v2_34_metadata_conv);
ff_metadata_conv(&chapter->metadata, NULL, ff_id3v2_4_metadata_conv);
+end:
av_free(dst);
}