Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f5846dc9
Commit
f5846dc9
authored
May 06, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
id3v2: stop ignoring text encoding for chapter titles
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
5a9e3760
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
id3v2.c
libavformat/id3v2.c
+12
-6
No files found.
libavformat/id3v2.c
View file @
f5846dc9
...
...
@@ -521,10 +521,11 @@ fail:
static
void
read_chapter
(
AVFormatContext
*
s
,
AVIOContext
*
pb
,
int
taglen
,
char
*
tag
,
ID3v2ExtraMeta
**
extra_meta
)
{
AVRational
time_base
=
{
1
,
1000
};
char
title
[
1024
];
uint32_t
start
,
end
;
uint8_t
*
dst
=
NULL
;
int
encoding
;
taglen
-=
avio_get_str
(
pb
,
taglen
,
title
,
sizeof
(
title
)
);
decode_str
(
s
,
pb
,
0
,
&
dst
,
&
taglen
);
if
(
taglen
<
16
)
return
;
...
...
@@ -538,14 +539,19 @@ static void read_chapter(AVFormatContext *s, AVIOContext *pb, int taglen, char *
avio_read
(
pb
,
tag
,
4
);
if
(
!
memcmp
(
tag
,
"TIT2"
,
4
))
{
taglen
=
FFMIN
(
taglen
,
avio_rb32
(
pb
));
if
(
taglen
<
0
)
if
(
taglen
<
0
)
{
av_free
(
dst
);
return
;
avio_skip
(
pb
,
3
);
avio_get_str
(
pb
,
taglen
,
title
,
sizeof
(
title
));
}
avio_skip
(
pb
,
2
);
encoding
=
avio_r8
(
pb
);
av_freep
(
&
dst
);
decode_str
(
s
,
pb
,
encoding
,
&
dst
,
&
taglen
);
}
}
avpriv_new_chapter
(
s
,
s
->
nb_chapters
+
1
,
time_base
,
start
,
end
,
title
);
avpriv_new_chapter
(
s
,
s
->
nb_chapters
+
1
,
time_base
,
start
,
end
,
dst
);
av_free
(
dst
);
}
typedef
struct
ID3v2EMFunc
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment